aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2018-11-30 12:35:33 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitbe774436c1663735dca75a46d9c9c77e6a93b710 (patch)
tree3514f18a03c1e72ceb3d7ae2d43fdbfea28b5fcd /core
parent06ddd3aac64243712df7fefa0483d3f7e6f96b73 (diff)
downloaddexon-be774436c1663735dca75a46d9c9c77e6a93b710.tar.gz
dexon-be774436c1663735dca75a46d9c9c77e6a93b710.tar.zst
dexon-be774436c1663735dca75a46d9c9c77e6a93b710.zip
dex: verify header that imported from fetcher (#68)
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 30552471a..878ed0a56 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1734,6 +1734,10 @@ func (bc *BlockChain) insertDexonChain(chain types.Blocks) (int, []interface{},
return 0, events, coalescedLogs, nil
}
+func (bc *BlockChain) VerifyDexonHeader(header *types.Header) error {
+ return bc.hc.verifyTSig(header, bc.verifierCache)
+}
+
func (bc *BlockChain) ProcessPendingBlock(block *types.Block, witness *coreTypes.Witness) (*common.Hash, error) {
n, events, logs, err := bc.processPendingBlock(block, witness)
bc.PostChainEvents(events, logs)