Update BlockChain to record NodeInfo (#95)

This commit is contained in:
Matt K
2017-12-07 13:32:16 -06:00
committed by GitHub
parent 18163f970e
commit 921bde1089
21 changed files with 276 additions and 45 deletions
+6
View File
@@ -13,6 +13,11 @@ type Blockchain struct {
contractAttributes map[string]map[string]string
blocksChannel chan core.Block
WasToldToStop bool
node core.Node
}
func (blockchain *Blockchain) Node() core.Node {
return blockchain.node
}
func (blockchain *Blockchain) GetAttribute(contract core.Contract, attributeName string, blockNumber *big.Int) (interface{}, error) {
@@ -29,6 +34,7 @@ func NewBlockchain() *Blockchain {
return &Blockchain{
blocks: make(map[int64]core.Block),
contractAttributes: make(map[string]map[string]string),
node: core.Node{GenesisBlock: "GENESIS"},
}
}