diff --git a/core/blockchain.go b/core/blockchain.go index e05b5dd45..9b93f421e 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1295,7 +1295,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1) if ptd == nil { - return WriteStatus(0), consensus.ErrUnknownAncestor + return NonStatTy, consensus.ErrUnknownAncestor } // Make sure no inconsistent state is leaked during insertion externTd := new(big.Int).Add(block.Difficulty(), ptd) diff --git a/plugins/wrappers/backendwrapper/backendwrapper.go b/plugins/wrappers/backendwrapper/backendwrapper.go index 71afedb92..21140abe9 100644 --- a/plugins/wrappers/backendwrapper/backendwrapper.go +++ b/plugins/wrappers/backendwrapper/backendwrapper.go @@ -206,13 +206,50 @@ func (p *progress) CurrentBlock() uint64 { func (p *progress) HighestBlock() uint64 { return p.p.HighestBlock } + func (p *progress) PulledStates() uint64 { - //return p.p.PulledStates - return 93845203 + return 0 } func (p *progress) KnownStates() uint64 { - //return p.p.KnownStates - return 2093847029 + return 0 +} + +//TODO remove after new Plugeth-utils +func (p *progress) SyncedAccounts() uint64 { + return p.p.SyncedAccounts +} +func (p *progress) SyncedAccountBytes() uint64 { + return p.p.SyncedAccountBytes +} +func (p *progress) SyncedBytecodes() uint64 { + return p.p.SyncedBytecodes +} +func (p *progress) SyncedBytecodeBytes() uint64 { + return p.p.SyncedBytecodeBytes +} +func (p *progress) SyncedStorage() uint64 { + return p.p.SyncedStorage +} +func (p *progress) SyncedStorageBytes() uint64 { + return p.p.SyncedStorageBytes +} +func (p *progress) HealedTrienodes() uint64 { + return p.p.HealedTrienodes +} +func (p *progress) HealedTrienodeBytes() uint64 { + return p.p.HealedTrienodeBytes +} +func (p *progress) HealedBytecodes() uint64 { + return p.p.HealedBytecodes +} +func (p *progress) HealedBytecodeBytes() uint64 { + return p.p.HealedBytecodeBytes +} +func (p *progress) HealingTrienodes() uint64 { + return p.p.HealingTrienodes +} +func (p *progress) HealingBytecode() uint64 { + return p.p.HealingBytecode } func (d *dl) Progress() core.Progress { diff --git a/plugins/wrappers/wrappers.go b/plugins/wrappers/wrappers.go index e50280c12..0b0389f4a 100644 --- a/plugins/wrappers/wrappers.go +++ b/plugins/wrappers/wrappers.go @@ -44,7 +44,7 @@ func (w *WrappedContract) GetOp(n uint64) core.OpCode { } func (w *WrappedContract) GetByte(n uint64) byte { - return w.c.GetByte(n) + return byte(w.c.GetOp(n)) } func (w *WrappedContract) Caller() core.Address {