Skip to content

Commit

Permalink
v1.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
VandeurenGlenn committed Apr 7, 2024
1 parent 9965fbc commit c3a91b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/chain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leofcoin/chain",
"version": "1.6.6",
"version": "1.6.8",
"description": "Official javascript implementation",
"private": false,
"exports": {
Expand Down
5 changes: 4 additions & 1 deletion packages/chain/src/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ export default class Chain extends VersionControl {
// @ts-ignore
transaction.hash = hash
}
if (!(await transactionStore.has(hash))) {
transactionStore.put(hash, await blockMessage.hash())
}

;(await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash))
return transaction
Expand Down Expand Up @@ -526,7 +529,7 @@ export default class Chain extends VersionControl {
try {
const has = await globalThis.transactionPoolStore.has(hash)

if (!has) {
if (!has && !(await transactionStore.has(hash))) {
await globalThis.transactionPoolStore.put(hash, transaction.encoded)
}
if (this.#participating && !this.#runningEpoch) this.#runEpoch()
Expand Down
2 changes: 1 addition & 1 deletion packages/chain/test/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ for (let i = 0; i < 1000; i++) {
nonce,
params: [
peernet.selectedAccount,
'YTqxcZqw8irJDRUBbuLq5ijuTycDmVfkKSmnx22eVrbxJB6Gf4FGD',
'YTqwkCFzxdPM1q45745tEefNMo9Zn9QzwUVDmUNWkve6Xz7zBgw24',
chain.utils.parseUnits('10').toString()
]
})
Expand Down

0 comments on commit c3a91b1

Please sign in to comment.