les: historical data garbage collection (#19570)
This change introduces garbage collection for the light client. Historical chain data is deleted periodically. If you want to disable the GC, use the --light.nopruning flag.
This commit is contained in:
@ -584,7 +584,7 @@ func (b *Block) TotalDifficulty(ctx context.Context) (hexutil.Big, error) {
|
||||
}
|
||||
h = header.Hash()
|
||||
}
|
||||
return hexutil.Big(*b.backend.GetTd(h)), nil
|
||||
return hexutil.Big(*b.backend.GetTd(ctx, h)), nil
|
||||
}
|
||||
|
||||
// BlockNumberArgs encapsulates arguments to accessors that specify a block number.
|
||||
|
Reference in New Issue
Block a user