Skip to content

Commit a34b308

Browse files
Add GetLatestBlockHashAsync (#157)
* ⚡ Use GetLatestBlockhash * 📦 Upgrade Solana.Unity.Rpc
1 parent 876a703 commit a34b308

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

Packages/Solana.Unity.Rpc.dll

1 KB
Binary file not shown.

Runtime/codebase/WalletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public async Task<string> GetBlockHash(
300300
break;
301301
}
302302
}
303-
var blockhash = (await ActiveRpcClient.GetRecentBlockHashAsync(commitment)).Result?.Value?.Blockhash;
303+
var blockhash = (await ActiveRpcClient.GetLatestBlockHashAsync(commitment)).Result?.Value?.Blockhash;
304304
if(exists) _commitmentCache.Remove(commitment.ToString());
305305
if(blockhash != null && useCache)_commitmentCache.Add(commitment.ToString(), (DateTime.Now, blockhash));
306306
return blockhash;

0 commit comments

Comments
 (0)