Add Nonce and ValidUntilBlock to Transaction#765
Conversation
Codecov Report
@@ Coverage Diff @@
## master #765 +/- ##
==========================================
+ Coverage 32.97% 33.16% +0.18%
==========================================
Files 164 164
Lines 11857 11869 +12
==========================================
+ Hits 3910 3936 +26
+ Misses 7947 7933 -14
Continue to review full report at Codecov.
|
|
|
||
| public virtual bool Verify(Snapshot snapshot, IEnumerable<Transaction> mempool) | ||
| { | ||
| if (ValidUntilBlock <= snapshot.Height || ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement) |
There was a problem hiding this comment.
Why we need to check the second part? ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement
There was a problem hiding this comment.
With this we can receive a Transaction and drop it for request again in certains blocks, do you think that is a good check this on Verify?
There was a problem hiding this comment.
I think it is reverified at every block anyway.
There was a problem hiding this comment.
Maybe it the increment when no parameter is passed.
tx.ValidUntilBlock = snapshot.Height + Transaction.MaxValidUntilBlockIncrement
igormcoelho
left a comment
There was a problem hiding this comment.
very good Erik!
Nonce and Expiration is fundamental without utxo.
|
|
||
| public virtual bool Verify(Snapshot snapshot, IEnumerable<Transaction> mempool) | ||
| { | ||
| if (ValidUntilBlock <= snapshot.Height || ValidUntilBlock > snapshot.Height + MaxValidUntilBlockIncrement) |
There was a problem hiding this comment.
I think it is reverified at every block anyway.
No description provided.