Browse Source

storage-node: runtime-api note for the future

Mokhtar Naamani 4 years ago
parent
commit
6fe629015e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      storage-node/packages/runtime-api/index.js

+ 2 - 0
storage-node/packages/runtime-api/index.js

@@ -241,6 +241,8 @@ class RuntimeApi {
     // synchronize access to nonce
     await this.executeWithAccountLock(accountId, async () => {
       const nonce = this.nonces[accountId] || (await this.api.query.system.accountNonce(accountId))
+      // In future use this rpc method to take the pending tx pool into account when fetching the nonce
+      // const nonce = await this.api.rpc.system.accountNextIndex(accountId)
 
       try {
         unsubscribe = await tx.sign(fromKey, { nonce }).send(handleTxUpdates)