Skip to content

Commit

Permalink
Make function sig in test more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Nov 30, 2022
1 parent a6ad561 commit 0dedc59
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ process.env.SOLIDITY_COVERAGE

it("Losing a race shouldn't prevent a miner from continuing", async function () {
reputationMinerClient._processingDelay = 1;
const SUBMISSION_SIG = web3.utils.soliditySha3("submitRootHash(bytes32,uint256,bytes32,uint256)").slice(0, 10);

const reputationMinerClient2 = new ReputationMinerClient({
loader,
realProviderPort,
Expand Down Expand Up @@ -397,7 +399,7 @@ process.env.SOLIDITY_COVERAGE
if (!txReceipt.status) {
// Was it actually a race?
const tx = await web3GetTransaction(txHash);
if (tx.input.slice(0, 10) === "0x3fcbcf0d") {
if (tx.input.slice(0, 10) === SUBMISSION_SIG) {
lostRace = true;
}
}
Expand Down Expand Up @@ -429,7 +431,7 @@ process.env.SOLIDITY_COVERAGE
for (let txCount = 0; txCount < block.transactions.length; txCount += 1) {
const txHash = block.transactions[txCount];
const tx = await web3GetTransaction(txHash);
if (tx.input.slice(0, 10) === "0x3fcbcf0d") {
if (tx.input.slice(0, 10) === SUBMISSION_SIG) {
submissionAddresses.push(tx.from);
}
}
Expand Down

0 comments on commit 0dedc59

Please sign in to comment.