-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix to use bigint for all value operations and fix to return nil when…
… the indexed data is not ready
- Loading branch information
Showing
9 changed files
with
115 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ use ( | |
. | ||
./integration-tests | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package backend | ||
|
||
// TxIndexingError is an API error that indicates the transaction indexing is not | ||
// fully finished yet with JSON error code and a binary data blob. | ||
type TxIndexingError struct{} | ||
|
||
// NewTxIndexingError creates a TxIndexingError instance. | ||
func NewTxIndexingError() *TxIndexingError { return &TxIndexingError{} } | ||
|
||
// Error implement error interface, returning the error message. | ||
func (e *TxIndexingError) Error() string { | ||
return "transaction indexing is in progress" | ||
} | ||
|
||
// 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 -32000 // to be decided | ||
} | ||
|
||
// ErrorData returns the hex encoded revert reason. | ||
func (e *TxIndexingError) ErrorData() interface{} { return "transaction indexing is in progress" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters