Skip to content

Commit

Permalink
Renamed symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
prasannavl committed Jul 27, 2023
1 parent 5f00e62 commit 20e7383
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/ain-cpp-imports/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub mod ffi {
fn pastChangiIntermediateHeight2() -> bool;
fn pastChangiIntermediateHeight3() -> bool;
fn pastChangiIntermediateHeight4() -> bool;
fn pastChangiIntermediateHeight5() -> bool;
fn SomethingElse() -> bool;
fn CppLogPrintf(message: String);
}
}
4 changes: 2 additions & 2 deletions lib/ain-cpp-imports/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mod ffi {
pub fn pastChangiIntermediateHeight4() -> bool {
unimplemented!("{}", UNIMPL_MSG)
}
pub fn pastChangiIntermediateHeight5() -> bool {
pub fn SomethingElse() -> bool {
unimplemented!("{}", UNIMPL_MSG)
}

Expand Down Expand Up @@ -160,7 +160,7 @@ pub fn past_changi_intermediate_height_4_height() -> bool {
}

pub fn past_changi_intermediate_height_5_height() -> bool {
ffi::pastChangiIntermediateHeight5()
ffi::SomethingElse()
}

pub fn log_print(message: &str) {
Expand Down
3 changes: 2 additions & 1 deletion lib/ain-evm/src/txqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ impl TransactionQueue {
data.account_nonces
.insert(signed_tx.sender, signed_tx.nonce());

if ain_cpp_imports::past_changi_intermediate_height_5_height() {
let is_over_changi5 = ain_cpp_imports::past_changi_intermediate_height_5_height();
if is_over_changi5 {
gas_fee = match calculate_gas_fee(signed_tx, gas_used, base_fee) {
Ok(fee) => fee,
Err(_) => return Err(QueueError::InvalidFee),
Expand Down
3 changes: 2 additions & 1 deletion src/ffi/ffiexports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ bool pastChangiIntermediateHeight4() {
return ::ChainActive().Height() >= Params().GetConsensus().ChangiIntermediateHeight4;
}

bool pastChangiIntermediateHeight5() {
bool SomethingElse() {
LOCK(cs_main);
return ::ChainActive().Height() >= Params().GetConsensus().ChangiIntermediateHeight5;
}

2 changes: 1 addition & 1 deletion src/ffi/ffiexports.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int getCurrentHeight();
bool pastChangiIntermediateHeight2();
bool pastChangiIntermediateHeight3();
bool pastChangiIntermediateHeight4();
bool pastChangiIntermediateHeight5();
bool SomethingElse();
void CppLogPrintf(rust::string message);

#endif // DEFI_FFI_FFIEXPORTS_H

0 comments on commit 20e7383

Please sign in to comment.