add func for download and testing

pull/97/head
Minh Doan 6 years ago committed by Minh Doan
parent fe6fc151bf
commit 38a690bfc2
  1. 10
      node/node.go

@ -80,6 +80,16 @@ type Node struct {
testBankKey *ecdsa.PrivateKey
}
// GetBlockHashes used for state download.
func (node *Node) GetBlockHashes() [][32]byte {
return node.blockchain.GetBlockHashes()
}
// SetBlockchain is used for testing
func (node *Node) SetBlockchain(bc *blockchain.Blockchain) {
node.blockchain = bc
}
// Add new crossTx and proofs to the list of crossTx that needs to be sent back to client
func (node *Node) addCrossTxsToReturn(crossTxs []*blockchain.CrossShardTxAndProof) {
node.crossTxToReturnMutex.Lock()

Loading…
Cancel
Save