Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Aug 28, 2024
1 parent 501d079 commit 51a731a
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 @@ -563,6 +563,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);
this.log.info(`Sent transaction ${txHash}`);
Expand Down

0 comments on commit 51a731a

Please sign in to comment.