Nest packages under pkg

This commit is contained in:
Eric Meyer
2017-11-06 13:06:03 -06:00
parent cf5f2f28db
commit f4a603efcb
36 changed files with 45 additions and 54 deletions
+15
View File
@@ -0,0 +1,15 @@
package core
type Block struct {
Difficulty int64
GasLimit int64
GasUsed int64
Hash string
Nonce string
Number int64
ParentHash string
Size int64
Time int64
Transactions []Transaction
UncleHash string
}
+7
View File
@@ -0,0 +1,7 @@
package core
type Blockchain interface {
SubscribeToBlocks(blocks chan Block)
StartListening()
StopListening()
}
+5
View File
@@ -0,0 +1,5 @@
package core
type BlockchainObserver interface {
NotifyBlockAdded(Block)
}
+13
View File
@@ -0,0 +1,13 @@
package core_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestVulcanizedb(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Vulcanizedb Suite")
}
+11
View File
@@ -0,0 +1,11 @@
package core
type Transaction struct {
Hash string
Data []byte
Nonce uint64
To string
GasLimit int64
GasPrice int64
Value int64
}