mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
fix copy, fix comments
This commit is contained in:
parent
e4a794aeb1
commit
42d3dc85bf
1 changed files with 9 additions and 10 deletions
|
|
@ -50,15 +50,13 @@ type Reader interface {
|
||||||
|
|
||||||
// ContractCode returns the code associated with a particular account.
|
// ContractCode returns the code associated with a particular account.
|
||||||
//
|
//
|
||||||
// - Returns an empty code if it does not exist
|
// - It returns an error to indicate code doesn't exist
|
||||||
// - It can return an error to indicate code doesn't exist
|
|
||||||
// - The returned code is safe to modify after the call
|
// - The returned code is safe to modify after the call
|
||||||
ContractCode(addr common.Address, codeHash common.Hash) ([]byte, error)
|
ContractCode(addr common.Address, codeHash common.Hash) ([]byte, error)
|
||||||
|
|
||||||
// ContractCodeSize returns the size of the code associated with a particular account.
|
// ContractCodeSize returns the size of the code associated with a particular account.
|
||||||
//
|
//
|
||||||
// - Returns 0 if the code does not exist
|
// - It returns an error to indicate code doesn't exist
|
||||||
// - It can return an error to indicate code doesn't exist
|
|
||||||
ContractCodeSize(addr common.Address, codeHash common.Hash) (int, error)
|
ContractCodeSize(addr common.Address, codeHash common.Hash) (int, error)
|
||||||
|
|
||||||
// Copy returns a deep-copied state reader.
|
// Copy returns a deep-copied state reader.
|
||||||
|
|
@ -271,6 +269,7 @@ func (r *trieReader) Copy() Reader {
|
||||||
return &trieReader{
|
return &trieReader{
|
||||||
root: r.root,
|
root: r.root,
|
||||||
db: r.db,
|
db: r.db,
|
||||||
|
contractDB: r.contractDB,
|
||||||
buff: crypto.NewKeccakState(),
|
buff: crypto.NewKeccakState(),
|
||||||
mainTrie: mustCopyTrie(r.mainTrie),
|
mainTrie: mustCopyTrie(r.mainTrie),
|
||||||
subRoots: maps.Clone(r.subRoots),
|
subRoots: maps.Clone(r.subRoots),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue