diff options
author | Sonic <sonic@dexon.org> | 2019-05-08 17:03:39 +0800 |
---|---|---|
committer | Sonic <sonic@dexon.org> | 2019-05-08 17:03:39 +0800 |
commit | b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58 (patch) | |
tree | cc5c0b68bdc99bd72bde7238f97c9ed72f792d41 | |
parent | 732611145661380064ef31f7e60d50da6bd7a04a (diff) | |
download | dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.tar dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.tar.gz dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.tar.bz2 dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.tar.lz dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.tar.xz dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.tar.zst dexon-b6c2c72d553e4680259fc8d05b0bcf9f4d0d4b58.zip |
light: implement GetGovStateByNumber and InsertDexonHeaderChain (Stub)
-rw-r--r-- | light/lightchain.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/light/lightchain.go b/light/lightchain.go index 016733c99..a6cdd6f86 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -19,15 +19,18 @@ package light import ( "context" "errors" + "fmt" "math/big" "sync" "sync/atomic" "time" + dexCore "github.com/dexon-foundation/dexon-consensus/core" lru "github.com/hashicorp/golang-lru" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/consensus" + "github.com/dexon-foundation/dexon/consensus/dexcon" "github.com/dexon-foundation/dexon/core" "github.com/dexon-foundation/dexon/core/rawdb" "github.com/dexon-foundation/dexon/core/state" @@ -300,6 +303,10 @@ func (self *LightChain) GetBlockByNumber(ctx context.Context, number uint64) (*t return self.GetBlock(ctx, hash, number) } +func (self *LightChain) GetGovStateByNumber(number uint64) (*types.GovState, error) { + return nil, fmt.Errorf("not implemented yet") +} + // Stop stops the blockchain service. If any imports are currently in progress // it will abort them using the procInterrupt. func (bc *LightChain) Stop() { @@ -394,6 +401,11 @@ func (self *LightChain) InsertHeaderChain(chain []*types.Header, checkFreq int) return i, err } +func (self *LightChain) InsertDexonHeaderChain([]*types.HeaderWithGovState, + dexcon.GovernanceStateFetcher, *dexCore.TSigVerifierCache) (int, error) { + return 0, fmt.Errorf("not implemented yet") +} + // CurrentHeader retrieves the current head header of the canonical chain. The // header is retrieved from the HeaderChain's internal cache. func (self *LightChain) CurrentHeader() *types.Header { |