OSDN Git Service

rpc links blockStore.
authorgguoss <1536310027@qq.com>
Fri, 28 Jul 2017 09:16:17 +0000 (17:16 +0800)
committergguoss <1536310027@qq.com>
Fri, 28 Jul 2017 09:16:17 +0000 (17:16 +0800)
node/node.go
rpc/core/pipe.go

index 49e546f..b9f08ba 100644 (file)
@@ -197,7 +197,7 @@ func (n *Node) AddListener(l p2p.Listener) {
 // rpc calls from this node
 func (n *Node) ConfigureRPC() {
        rpccore.SetEventSwitch(n.evsw)
-       //rpccore.SetBlockStore(n.blockStore)
+       rpccore.SetBlockStore(n.blockStore)
        //rpccore.SetConsensusState(n.consensusState)
        //rpccore.SetMempool(n.mempoolReactor.Mempool)
        rpccore.SetSwitch(n.sw)
index a32d872..4c30fe6 100644 (file)
@@ -8,6 +8,7 @@ import (
 //     "github.com/tendermint/tendermint/state/txindex"
        "github.com/blockchain/types"
        "github.com/tendermint/tmlibs/log"
+    bc "github.com/blockchain/blockchain"
 )
 
 //----------------------------------------------
@@ -37,7 +38,7 @@ var (
 //     proxyAppQuery proxy.AppConnQuery
 
        // interfaces defined in types and above
-       //blockStore     types.BlockStore
+       blockStore     *bc.MemStore
        //mempool        types.Mempool
        //consensusState Consensus
        p2pSwitch      P2P
@@ -55,11 +56,11 @@ func SetEventSwitch(evsw types.EventSwitch) {
        eventSwitch = evsw
 }
 
-/*
-func SetBlockStore(bs types.BlockStore) {
+func SetBlockStore(bs *bc.MemStore) {
        blockStore = bs
 }
 
+/*
 func SetMempool(mem types.Mempool) {
        mempool = mem
 }