I am using Algorand2 SDK, below is my code to get the transaction hash for the transactions but it is returning random transaction hashes which are not matching with the explorer hash for the transaction
string ALGOD_API_ADDR = "http://1localhost:8887/";
string ALGOD_API_TOKEN = "8300d867cc2dbc9398dff961d0dbaefae8eaf8730217f5c468a358a4";
var httpClient = HttpClientConfigurator.ConfigureHttpClient(ALGOD_API_ADDR, ALGOD_API_TOKEN);
DefaultApi algodApiInstance= new DefaultApi(httpClient);
var blockinfo = await algodApiInstance.GetBlockAsync(211518);
foreach (var txndata in blockinfo.Block.Transactions)
Actually I think that issue is to do with the genesis id / hash stuff being missing in the block transactions…
@Sowna you can probably fix it by iterating over the transactions in the block and setting the missing genesis field(s) (I forget which ones but I think Fabrice linked to them). The TxId is a computed field, and when the node returns the transactions in the block, it “compresses” out the fields that belong to the block. Those then need to be re-added into the transaction to get the right id.
However, I should probably add a utility method in the SDK to be honest.
Hi @FrankS ,
Using Algorand2 SDK able to get the blockdata which contains all the signed transactions
example for block no. 17497913
Transaction “M2JNAHUX2D4M3ZRYGCR5OJOW2OMAQNIXMVDJOAXWRIDFWVX6LTIQ” below the result where SenderRewards is null which supposed to be 0.000003