Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lints #3119

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/ain-ocean/src/api/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ async fn get_feed(
.list(None, SortOrder::Descending)?
.paginate(&query)
.flatten()
.into_iter()
.filter(|((token, currency, oracle_id, _), _)| {
key.0.eq(token) && key.1.eq(currency) && key.2.eq(oracle_id)
})
Expand Down
7 changes: 3 additions & 4 deletions src/dfi/rpc_accounts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3703,13 +3703,12 @@ UniValue logdbhashes(const JSONRPCRequest &request) {
const auto height = ::ChainActive().Height();
const auto blockHash = ::ChainActive().Tip()->GetBlockHash().ToString();


// Prepare result
UniValue result(UniValue::VOBJ);
result.pushKV("height", height);
result.pushKV("blockhash", blockHash);
// Note that this only guaranteed to be equal with other nodes
// if they didn't hit undo changes at different points.
// if they didn't hit undo changes at different points.
// Other known instance that can cause this to differ:
// - consolidaterewards at different points if pre-static addresses are involved.
result.pushKV("dvmhash", hashHex);
Expand All @@ -3718,15 +3717,15 @@ UniValue logdbhashes(const JSONRPCRequest &request) {
auto res = XResultValueLogged(evm_try_get_latest_block_hash(result));
if (res) {
// Only available after EVM activation
// EVM block hash already is inclusive of all it's
// EVM block hash already is inclusive of all it's
// state, so we don't need to do the DVM shenangins.
auto evmBlockHash = uint256::FromByteArray(*res).GetHex();
result.pushKV("evmhash", evmBlockHash);
}

const auto evmDbNodeHashHex = XResultValueLogged(evm_try_get_hash_db_state(result));
if (evmDbNodeHashHex) {
// Note: This can vary from node to node unlike the rest.
// Note: This can vary from node to node unlike the rest.
result.pushKV("varhash_evmalldb", std::string(*evmDbNodeHashHex));
}

Expand Down
Loading