def commit(self, txnCount, stateRoot, txnRoot, ppTime) -> List: committedTxns = super().commit(txnCount, stateRoot, txnRoot, ppTime) for txn in committedTxns: # Handle POOL_UPGRADE or POOL_CONFIG transaction here # only in case it is not forced. # If it is forced then it was handled earlier # in applyForced method. if not is_forced(txn): self.upgrader.handleUpgradeTxn(txn) self.poolCfg.handleConfigTxn(txn) return committedTxns
def commit(self, txnCount, stateRoot, txnRoot, ppTime) -> List: committedTxns = super().commit(txnCount, stateRoot, txnRoot, ppTime) for txn in committedTxns: # Handle POOL_UPGRADE or POOL_CONFIG transaction here # only in case it is not forced. # If it is forced then it was handled earlier # in applyForced method. if not is_forced(txn): self.upgrader.handleActionTxn(txn) self.poolCfg.handleConfigTxn(txn) return committedTxns
def commit_batch(self, three_pc_batch: ThreePcBatch, prev_result=None): committed_txns = super().commit_batch(three_pc_batch, prev_result) for txn in committed_txns: # Handle POOL_UPGRADE or POOL_CONFIG transaction here # only in case it is not forced. # If it is forced then it was handled earlier # in applyForced method. if not is_forced(txn): self.upgrader.handleUpgradeTxn(txn) self.pool_config.handleConfigTxn(txn) return committed_txns
def get_action_id(txn): seq_no = get_seq_no(txn) or '' if is_forced(txn): seq_no = '' return '{}{}'.format(get_req_id(txn), seq_no)