mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
make simulated progress function agree with syncprogress interface for client
This commit is contained in:
parent
bc59e80a1f
commit
23c1efeace
1 changed files with 3 additions and 3 deletions
|
|
@ -162,15 +162,15 @@ func (b *SimulatedBackend) StorageAt(ctx context.Context, contract common.Addres
|
|||
// Progress retrieves the progress of the client syncing with the simulated backend
|
||||
// Since there is no delay in synchronisation, we can assume that the simulated backend
|
||||
// knows the current state of the chain.
|
||||
func (d *SimulatedBackend) Progress() ethereum.SyncProgress {
|
||||
func (d *SimulatedBackend) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error) {
|
||||
current := d.blockchain.CurrentBlock().NumberU64()
|
||||
return ethereum.SyncProgress{
|
||||
return ðereum.SyncProgress{
|
||||
StartingBlock: uint64(0),
|
||||
CurrentBlock: current,
|
||||
HighestBlock: current,
|
||||
PulledStates: current,
|
||||
KnownStates: current,
|
||||
}
|
||||
}, nil
|
||||
}
|
||||
|
||||
// TransactionReceipt returns the receipt of a transaction.
|
||||
|
|
|
|||
Loading…
Reference in a new issue