diff --git a/core/txindexer.go b/core/txindexer.go index 433003b98a..45d2dbe4aa 100644 --- a/core/txindexer.go +++ b/core/txindexer.go @@ -179,7 +179,7 @@ func (indexer *txIndexer) report(head uint64) TxIndexProgress { tail = rawdb.ReadTxIndexTail(indexer.db) ) total := indexer.limit - if indexer.limit == 0 { + if indexer.limit == 0 || total > head { total = head + 1 // genesis included } var indexed uint64 diff --git a/internal/ethapi/errors.go b/internal/ethapi/errors.go index 6171cc4d6b..b5e668a805 100644 --- a/internal/ethapi/errors.go +++ b/internal/ethapi/errors.go @@ -71,7 +71,7 @@ func (e *TxIndexingError) Error() string { // ErrorCode returns the JSON error code for a revert. // See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal func (e *TxIndexingError) ErrorCode() int { - return 3 // TODO tbd + return -32000 // to be decided } // ErrorData returns the hex encoded revert reason.