diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-15 13:30:50 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 8150597b3878368ad090c9846cdf50dd812b2181 (patch) | |
tree | e6990143005d574424330aeb51af6dc2a193fd06 /core/types.go | |
parent | a27488515c91066a30989b6c751d214544367a1a (diff) | |
download | dexon-8150597b3878368ad090c9846cdf50dd812b2181.tar dexon-8150597b3878368ad090c9846cdf50dd812b2181.tar.gz dexon-8150597b3878368ad090c9846cdf50dd812b2181.tar.bz2 dexon-8150597b3878368ad090c9846cdf50dd812b2181.tar.lz dexon-8150597b3878368ad090c9846cdf50dd812b2181.tar.xz dexon-8150597b3878368ad090c9846cdf50dd812b2181.tar.zst dexon-8150597b3878368ad090c9846cdf50dd812b2181.zip |
core: refactor validator and fix light node sync (#25)
Remove custom Dexon validator by adding a new `ValidateWitnessData`
method into the validator interface. This allow us to properly detect
know blocks. This also allow other gdex "light" client to sync
compaction chain. Also, setup a standalone RPC node for handling RPC
reqeusts.
Diffstat (limited to 'core/types.go')
-rw-r--r-- | core/types.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/types.go b/core/types.go index 38b8e51dc..327031b01 100644 --- a/core/types.go +++ b/core/types.go @@ -33,6 +33,9 @@ type Validator interface { // ValidateState validates the given statedb and optionally the receipts and // gas used. ValidateState(block, parent *types.Block, state *state.StateDB, receipts types.Receipts, usedGas uint64) error + + // ValidateWitnessData validates the given witness result. + ValidateWitnessData(height uint64, data types.WitnessData) error } // Processor is an interface for processing blocks using a given initial state. |