mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core, internal: fixes
This commit is contained in:
parent
e96541876b
commit
582216adfa
2 changed files with 2 additions and 2 deletions
|
|
@ -179,7 +179,7 @@ func (indexer *txIndexer) report(head uint64) TxIndexProgress {
|
||||||
tail = rawdb.ReadTxIndexTail(indexer.db)
|
tail = rawdb.ReadTxIndexTail(indexer.db)
|
||||||
)
|
)
|
||||||
total := indexer.limit
|
total := indexer.limit
|
||||||
if indexer.limit == 0 {
|
if indexer.limit == 0 || total > head {
|
||||||
total = head + 1 // genesis included
|
total = head + 1 // genesis included
|
||||||
}
|
}
|
||||||
var indexed uint64
|
var indexed uint64
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ func (e *TxIndexingError) Error() string {
|
||||||
// ErrorCode returns the JSON error code for a revert.
|
// ErrorCode returns the JSON error code for a revert.
|
||||||
// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
|
// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
|
||||||
func (e *TxIndexingError) ErrorCode() int {
|
func (e *TxIndexingError) ErrorCode() int {
|
||||||
return 3 // TODO tbd
|
return -32000 // to be decided
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrorData returns the hex encoded revert reason.
|
// ErrorData returns the hex encoded revert reason.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue