Skip to content

Commit

Permalink
fix1
Browse files Browse the repository at this point in the history
  • Loading branch information
AshinGau committed Nov 26, 2024
1 parent c97e48f commit af8a801
Show file tree
Hide file tree
Showing 4 changed files with 11,514 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ where
if let Some(tx) = self.txs.get(txid) {
*evm.tx_mut() = tx.clone();
evm.db_mut().current_txid = txid;
evm.db_mut().raw_transfer = true; // no need to wait miner rewards
let mut raw_transfer = true;
if let Ok(Some(info)) = evm.db_mut().basic(tx.caller) {
raw_transfer &= info.is_empty_code_hash();
raw_transfer = info.is_empty_code_hash();
}
if let TxKind::Call(to) = tx.transact_to {
if let Ok(Some(info)) = evm.db_mut().basic(to) {
Expand All @@ -137,7 +138,9 @@ where
// If the transaction is unconfirmed, it may not require repeated execution
let mut should_execute = true;
let mut update_rewards = 0;
if tx_states[txid].tx_status == TransactionStatus::Unconfirmed {
if tx_states[txid].tx_status == TransactionStatus::Unconfirmed &&
!self.rewards_accumulators.contains_key(&txid)
{
if evm.db_mut().check_read_set(&tx_states[txid].read_set) {
// Unconfirmed transactions from the previous round might not need to be
// re-executed.
Expand Down
2 changes: 1 addition & 1 deletion src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl<DB> PartitionDB<DB> {
block_hashes: BTreeMap::new(),
tx_read_set: AHashMap::new(),
current_txid: 0,
raw_transfer: false,
raw_transfer: true,
rewards_accumulators,
accumulated_rewards: 0,
}
Expand Down
1 change: 1 addition & 0 deletions transition_state_parallel.json

Large diffs are not rendered by default.

Loading

0 comments on commit af8a801

Please sign in to comment.