Skip to content

Commit

Permalink
removed simulate and checkTx requirement with whitelist conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
avendauz committed Aug 13, 2021
1 parent a0e647f commit 986fc71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/ante/NewSetUpContextDecorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64, tx sdk.Tx, gk
}


if isOnWhiteListAndFree && !simulate && !ctx.IsCheckTx() {
if isOnWhiteListAndFree {
fmt.Println("ON WHITE LIST, ASSIGNING GAS METER")
gm := gasmeter.NewFreeGasMeter(gasLimit)
gk.AddGasMeter(&gm)
Expand Down
6 changes: 3 additions & 3 deletions test/integration/specs/nft/whitelist.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('whitelist', function() {
this.timeout(6000000);
let bz: API

beforeEach(() => getAPIAndSwarm(mattnetConfig)
beforeEach(() => getAPIAndSwarm(mattnetConfig, true)
.then(({bz: newBz}) => bz = newBz)
)
// beforeEach(() =>
Expand All @@ -39,7 +39,7 @@ describe('whitelist', function() {
});

it('should not charge for all accounts on the whitelist', () => {
return Promise.all<API>(times(10).map(() =>
return Promise.all<API>(times(5).map(() =>
createMintedBz()
))
.then(passThroughAwait((clients : API[]) =>
Expand All @@ -63,7 +63,7 @@ describe('whitelist', function() {
});

it("should charge everybody if whitelist is empty", () => {
return Promise.all<API>(times(10).map(() =>
return Promise.all<API>(times(5).map(() =>
createMintedBz()
))
.then((clients: API[]) => Promise.all(clients.map((client, idx) => checkGasWasCharged(client, `nft-id-${idx}`))))
Expand Down

0 comments on commit 986fc71

Please sign in to comment.