set gas limit before proving transactions
This commit is contained in:
parent
c3769b8874
commit
e2dfea8c12
@ -243,12 +243,14 @@ impl TransactionProof {
|
||||
pub fn check_response(&self, state_items: &[DBValue]) -> ProvedExecution {
|
||||
let root = self.header.state_root();
|
||||
|
||||
let mut env_info = self.env_info.clone();
|
||||
env_info.gas_limit = self.tx.gas.clone();
|
||||
state::check_proof(
|
||||
state_items,
|
||||
root,
|
||||
&self.tx,
|
||||
&*self.engine,
|
||||
&self.env_info,
|
||||
&env_info,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -1627,10 +1627,12 @@ impl ::client::ProvingBlockChainClient for Client {
|
||||
}
|
||||
|
||||
fn prove_transaction(&self, transaction: SignedTransaction, id: BlockId) -> Option<Vec<DBValue>> {
|
||||
let (state, env_info) = match (self.state_at(id), self.env_info(id)) {
|
||||
let (state, mut env_info) = match (self.state_at(id), self.env_info(id)) {
|
||||
(Some(s), Some(e)) => (s, e),
|
||||
_ => return None,
|
||||
};
|
||||
|
||||
env_info.gas_limit = transaction.gas.clone();
|
||||
let mut jdb = self.state_db.lock().journal_db().boxed_clone();
|
||||
let backend = state::backend::Proving::new(jdb.as_hashdb_mut());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user