Skip to content

Commit

Permalink
refactor(core-blockchain): remove unnecessary await (#1559)
Browse files Browse the repository at this point in the history
transaction pool's flush() method is not async, no need to call it with await.
  • Loading branch information
vasild authored and faustbrian committed Dec 3, 2018
1 parent 935b1e1 commit 2a80a2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core-blockchain/__tests__/blockchain.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('Blockchain', () => {
tx => tx.type !== 2,
)

await blockchain.transactionPool.flush()
blockchain.transactionPool.flush()
await blockchain.postTransactions(transactionsWithoutType2, false)
const transactions = blockchain.transactionPool.getTransactions(0, 200)

Expand All @@ -159,7 +159,7 @@ describe('Blockchain', () => {
transactionsWithoutType2.map(transaction => transaction.serialized),
)

await blockchain.transactionPool.flush()
blockchain.transactionPool.flush()
})
})

Expand Down Expand Up @@ -321,7 +321,7 @@ describe('Blockchain', () => {
tx => tx.type !== 2,
)

await blockchain.transactionPool.flush()
blockchain.transactionPool.flush()
await blockchain.postTransactions(transactionsWithoutType2, false)
const unconfirmedTransactions = blockchain.getUnconfirmedTransactions(200)

Expand All @@ -333,7 +333,7 @@ describe('Blockchain', () => {
transactionsWithoutType2.map(transaction => transaction.serialized),
)

await blockchain.transactionPool.flush()
blockchain.transactionPool.flush()
})
})

Expand Down

0 comments on commit 2a80a2f

Please sign in to comment.