Skip to content

Commit

Permalink
Fix EvmMapping FragmentTag bug (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy authored May 31, 2022
1 parent c9fba3e commit c72610e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions chain-impl-mockchain/src/fragment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ impl FragmentTag {
12 => Some(FragmentTag::VoteTally),
13 => Some(FragmentTag::MintToken),
14 => Some(FragmentTag::Evm),
15 => Some(FragmentTag::EvmMapping),
_ => None,
}
}
Expand Down
4 changes: 3 additions & 1 deletion chain-impl-mockchain/src/fragment/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Arbitrary for Fragment {
#[cfg(not(feature = "evm"))]
let r = g.next_u32() % 14;
#[cfg(feature = "evm")]
let r = g.next_u32() % 15;
let r = g.next_u32() % 16;
match r {
0 => Fragment::Initial(Arbitrary::arbitrary(g)),
1 => Fragment::OldUtxoDeclaration(Arbitrary::arbitrary(g)),
Expand All @@ -30,6 +30,8 @@ impl Arbitrary for Fragment {
13 => Fragment::MintToken(Arbitrary::arbitrary(g)),
#[cfg(feature = "evm")]
14 => Fragment::Evm(Arbitrary::arbitrary(g)),
#[cfg(feature = "evm")]
15 => Fragment::EvmMapping(Arbitrary::arbitrary(g)),
_ => unreachable!(),
}
}
Expand Down

0 comments on commit c72610e

Please sign in to comment.