Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Aug 8, 2024
1 parent 2a464b1 commit 2574895
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,13 @@ export class PXEService implements PXE {
if (await this.node.getTxEffect(txHash)) {
throw new Error(`A settled tx with equal hash ${txHash.toString()} exists.`);
}

const isValidTx = await this.node.validateTx(tx);

if (!isValidTx) {
throw new Error('The simulated transaction is unable to be added to state and is invalid.');
}

this.log.info(`Sending transaction ${txHash}`);
await this.node.sendTx(tx);
return txHash;
Expand Down

0 comments on commit 2574895

Please sign in to comment.