Nest packages under pkg
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package core
|
||||
|
||||
type Blockchain interface {
|
||||
SubscribeToBlocks(blocks chan Block)
|
||||
StartListening()
|
||||
StopListening()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package core
|
||||
|
||||
type BlockchainObserver interface {
|
||||
NotifyBlockAdded(Block)
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package core
|
||||
|
||||
type Transaction struct {
|
||||
Hash string
|
||||
Data []byte
|
||||
Nonce uint64
|
||||
To string
|
||||
GasLimit int64
|
||||
GasPrice int64
|
||||
Value int64
|
||||
}
|
||||
Reference in New Issue
Block a user