Skip to content

Commit

Permalink
Merge pull request #753 from anoma/tiago/ethbridge/move-queries-ext
Browse files Browse the repository at this point in the history
Move `QueriesExt` out of `apps` and into `shared`
  • Loading branch information
sug0 authored Nov 8, 2022
2 parents d844aad + 46fe52e commit 93f892c
Show file tree
Hide file tree
Showing 9 changed files with 454 additions and 444 deletions.
4 changes: 2 additions & 2 deletions apps/src/lib/node/ledger/shell/prepare_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
use namada::ledger::storage::traits::StorageHasher;
use namada::ledger::storage::{DBIter, DB};
use namada::ledger::storage_api::queries::{QueriesExt, SendValsetUpd};
use namada::proto::Tx;
use namada::types::storage::BlockHeight;
use namada::types::transaction::tx_types::TxType;
Expand All @@ -15,7 +16,6 @@ use crate::facade::tendermint_proto::abci::RequestPrepareProposal;
use crate::facade::tendermint_proto::abci::{
tx_record::TxAction, ExtendedCommitInfo, TxRecord,
};
use crate::node::ledger::shell::queries::{QueriesExt, SendValsetUpd};
use crate::node::ledger::shell::vote_extensions::{
iter_protocol_txs, split_vote_extensions,
};
Expand Down Expand Up @@ -284,6 +284,7 @@ mod test_prepare_proposal {
VotingPower, WeightedValidator,
};
use namada::ledger::pos::namada_proof_of_stake::PosBase;
use namada::ledger::storage_api::queries::QueriesExt;
use namada::proto::{Signed, SignedTxData};
use namada::types::address::nam;
use namada::types::ethereum_events::EthereumEvent;
Expand All @@ -301,7 +302,6 @@ mod test_prepare_proposal {
use crate::facade::tendermint_proto::abci::{
tx_record::TxAction, ExtendedCommitInfo, ExtendedVoteInfo, TxRecord,
};
use crate::node::ledger::shell::queries::QueriesExt;
use crate::node::ledger::shell::test_utils::{
self, gen_keypair, TestShell,
};
Expand Down
5 changes: 2 additions & 3 deletions apps/src/lib/node/ledger/shell/process_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
use data_encoding::HEXUPPER;
use namada::ledger::pos::types::VotingPower;
use namada::ledger::storage_api::queries::{QueriesExt, SendValsetUpd};
use namada::types::transaction::protocol::ProtocolTxType;
#[cfg(feature = "abcipp")]
use namada::types::voting_power::FractionalVotingPower;

use super::queries::{QueriesExt, SendValsetUpd};
use super::*;
use crate::facade::tendermint_proto::abci::response_process_proposal::ProposalStatus;
use crate::facade::tendermint_proto::abci::RequestProcessProposal;
Expand Down Expand Up @@ -359,8 +359,7 @@ where
// check that the fee payer has sufficient balance
let balance = self
.storage
.get_balance(&wrapper.fee.token, &wrapper.fee_payer())
.unwrap_or_default();
.get_balance(&wrapper.fee.token, &wrapper.fee_payer());

if wrapper.fee.amount <= balance {
TxResult {
Expand Down
Loading

0 comments on commit 93f892c

Please sign in to comment.