diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-09-20 16:08:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 16:08:08 +0800 |
commit | a4b6b9e6a28a4d8fc49ee76c191454a819265713 (patch) | |
tree | 716e5724b182b8dccb01a49faec4c163f1fafdb0 /core/crypto.go | |
parent | 2f1e71d9d298d1f6ade8d17a1db7a657b0223872 (diff) | |
download | tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.tar tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.tar.gz tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.tar.bz2 tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.tar.lz tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.tar.xz tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.tar.zst tangerine-consensus-a4b6b9e6a28a4d8fc49ee76c191454a819265713.zip |
core: refactor witness data processing flow (#124)
Since witness data need to include data from application after it
processed a block (e.g. stateRoot). We should make the process of
witness data asynchronous.
An interface `BlockProcessedChan()` is added to the application
interface to return a channel for notifying the consensus core when a
block is processed. The notification object includes a byte slice
(witenss data) which will be include in the final witness data object.
Diffstat (limited to 'core/crypto.go')
-rw-r--r-- | core/crypto.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/crypto.go b/core/crypto.go index e68d7cc..111f709 100644 --- a/core/crypto.go +++ b/core/crypto.go @@ -35,7 +35,8 @@ func hashWitness(block *types.Block) (common.Hash, error) { hash := crypto.Keccak256Hash( block.Witness.ParentHash[:], binaryTime, - binaryHeight) + binaryHeight, + block.Witness.Data[:]) return hash, nil } |