Skip to content

Commit

Permalink
evm: Rename finalize_block (#1928)
Browse files Browse the repository at this point in the history
* Rename finalize_block

* Revert "Rename finalize_block"

This reverts commit efdfbc3.

* Rename FFI call
  • Loading branch information
shohamc1 authored Apr 21, 2023
1 parent 12b7941 commit 57b0565
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ain-rs-exports/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod ffi {
fn evm_get_context() -> u64;
fn evm_discard_context(context: u64);
fn evm_queue_tx(context: u64, raw_tx: &str) -> Result<bool>;
fn evm_finalise(
fn evm_finalize(
context: u64,
update_state: bool,
miner_address: [u8; 20],
Expand Down Expand Up @@ -104,7 +104,7 @@ fn evm_queue_tx(context: u64, raw_tx: &str) -> Result<bool, Box<dyn Error>> {
}

use rlp::Encodable;
fn evm_finalise(
fn evm_finalize(
context: u64,
update_state: bool,
miner_address: [u8; 20],
Expand Down
2 changes: 1 addition & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc

// TODO Get failed TXs and try to restore to mempool
std::array<uint8_t, 20> dummyAddress{};
const auto rustHeader = evm_finalise(evmContext, false, dummyAddress);
const auto rustHeader = evm_finalize(evmContext, false, dummyAddress);

std::vector<uint8_t> evmHeader{};
evmHeader.resize(rustHeader.size());
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
std::copy(minter.begin(), minter.end(), minerAddress.begin());
}

evm_finalise(evmContext, true, minerAddress);
evm_finalize(evmContext, true, minerAddress);
}

auto &checkpoints = chainparams.Checkpoints().mapCheckpoints;
Expand Down

0 comments on commit 57b0565

Please sign in to comment.