question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TransactionResponse.Ledger should be of type int instead of long

See original GitHub issue

Describe the bug Ledger sequence numbers are encoded as Int32 internally in all XDR structures. However, the property TransactionResponse.Ledger is defined as long.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fracekcommented, Aug 6, 2019

It should be uint32 because Int32.MaxValue < Uint32.MaxValue.

1reaction
elucidsoftcommented, Aug 6, 2019

I would be more willing to do uint than int.

On Tue, Aug 6, 2019, 5:39 PM orbitlens notifications@github.com wrote:

Ledger sequence numbers are represented and stored on the ledger in a 4-bytes format. Many things internally rely on this value to be no more than UInt32.MaxValue. For example, Horizon transaction/operation/effect IDs and paging tokens generation algorithm expects strictly 4 bytes.

It seems to me that representing this value as UInt32 or Int32 is more consistent than treating it as Int64. Currently, we have to use explicit typecasting across all /ledger and /transaction endpoint responses.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elucidsoft/dotnet-stellar-sdk/issues/183?email_source=notifications&email_token=AABVCUFPPMJA5TMWLTD6NY3QDHVSVA5CNFSM4IJHCIN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3WRNEY#issuecomment-518854291, or mute the thread https://github.com/notifications/unsubscribe-auth/AABVCUGEZABHWR2VZO6T5UTQDHVSVANCNFSM4IJHCINQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ledger — hyperledger-fabricdocs main documentation
An application program can invoke a smart contract which uses simple ledger APIs to get, put and delete states. Notice how a state...
Read more >
About Transactions | Marqeta Docs
Transactions can be authorized, cleared, and settled either as dual-message transactions or as single-message transactions. The processing ...
Read more >
Documentation - Ethers.js
A Signer is a class which (usually) in some way directly or indirectly has access to a private key, which can sign messages...
Read more >
What is transaction code 253?
253 (*) Fraudulent card: Info: ... Invalid transaction. This code is often returned from the issuer when they do not accept the transaction....
Read more >
Proceedings of the Ninth International Conference on ...
Endorsing nodes update the world state without updating the ledger as well ... and they do the validation of the transaction response and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found