Skip to content

Commit

Permalink
ethereum: Fix constant name warning
Browse files Browse the repository at this point in the history
  • Loading branch information
leoyvens committed Sep 5, 2019
1 parent 9d52e9d commit e28b469
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datasource/ethereum/src/ethereum_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ where

// 0xfe is the "designated bad instruction" of the EVM, and Solidity
// uses it for asserts.
const PARITY_0xFE: &str = "Bad instruction fe";
const PARITY_BAD_INSTRUCTION_FE: &str = "Bad instruction fe";
const GANACHE_VM_EXECUTION_ERROR: i64 = -32000;
const GANACHE_REVERT_MESSAGE: &str =
"VM Exception while processing transaction: revert";
Expand Down Expand Up @@ -429,10 +429,10 @@ where
match rpc_error.data.as_ref().and_then(|d| d.as_str()) {
Some(data)
if data.starts_with(PARITY_REVERT_PREFIX)
|| data == PARITY_0xFE =>
|| data == PARITY_BAD_INSTRUCTION_FE =>
{
let reason = if data == PARITY_0xFE {
PARITY_0xFE.to_owned()
let reason = if data == PARITY_BAD_INSTRUCTION_FE {
PARITY_BAD_INSTRUCTION_FE.to_owned()
} else {
let payload =
data.trim_start_matches(PARITY_REVERT_PREFIX);
Expand Down

0 comments on commit e28b469

Please sign in to comment.