Skip to content

Commit

Permalink
fix: logic; fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
rictorlome committed Dec 17, 2024
1 parent b7ea242 commit 2fb8039
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fixtures/pvm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export const disableL1ValidatorTxBytes = () =>
concatBytes(baseTxbytes(), idBytes(), bytesForInt(10), inputBytes());

export const feeState = (): FeeState => ({
capacity: 1_000_000_000n,
capacity: 999_999n,
excess: 1n,
price: 1n,
timestamp: new Date().toISOString(),
Expand Down
2 changes: 1 addition & 1 deletion src/vms/pvm/etna-builder/spendHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export class SpendHelper {
*/
verifyGasUsage(): Error | null {
const gas = this.calculateGas();
if (this.feeState.capacity <= gas) {
if (this.feeState.capacity < gas) {
return new Error(
`Gas usage of transaction (${gas.toString()}) exceeds capacity (${this.feeState.capacity.toString()})`,
);
Expand Down

0 comments on commit 2fb8039

Please sign in to comment.