aboutsummaryrefslogtreecommitdiffstats
path: root/indexer
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-01-03 17:18:50 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitf9e8fba11b1e06794f89b7fb5175480a3eded5f2 (patch)
treeeb971da377ee5f21f3221d86d99be4c6a7e1208b /indexer
parent9f0fe7967af4b8d300ece5e9a406d75287dd964c (diff)
downloaddexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.tar
dexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.tar.gz
dexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.tar.bz2
dexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.tar.lz
dexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.tar.xz
dexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.tar.zst
dexon-f9e8fba11b1e06794f89b7fb5175480a3eded5f2.zip
core, indexer, dex: fix DexconApp block deliver after synced (#122)
When starts a bp node to sync with the network, bc.chainLastHeight map may not be initialized yet. Just return error if we can not get chain last height when preparing payload and verify block.
Diffstat (limited to 'indexer')
-rw-r--r--indexer/blockchain.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/indexer/blockchain.go b/indexer/blockchain.go
index 421535184..f41c05a15 100644
--- a/indexer/blockchain.go
+++ b/indexer/blockchain.go
@@ -42,7 +42,7 @@ type ReadOnlyBlockChain interface {
GetBlocksFromHash(common.Hash, int) (blocks []*types.Block)
GetBody(common.Hash) *types.Body
GetBodyRLP(common.Hash) rlp.RawValue
- GetChainLastConfirmedHeight(uint32) uint64
+ GetChainLastConfirmedHeight(uint32) (uint64, bool)
GetConfirmedBlockByHash(uint32, coreCommon.Hash) (*coreTypes.Block, types.Transactions)
GetCostInConfirmedBlocks(uint32, common.Address) (*big.Int, bool)
GetGovStateByHash(common.Hash) (*types.GovState, error)