mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
make account starting seq the parent close time to prevent replay attacks in reset networks (#131)
* make account starting seq the parent close time to prevent replay attacks in reset networks * add tests for activation --------- Co-authored-by: Denis Angell <dangell@transia.co>
This commit is contained in:
@@ -595,6 +595,8 @@ ValidNewAccountRoot::finalize(
|
||||
if ((tt == ttPAYMENT || tt == ttIMPORT || tt == ttGENESIS_MINT) && result == tesSUCCESS)
|
||||
{
|
||||
std::uint32_t const startingSeq{
|
||||
view.rules().enabled(featureXahauGenesis)
|
||||
? view.info().parentCloseTime.time_since_epoch().count() :
|
||||
view.rules().enabled(featureDeletableAccounts)
|
||||
? view.seq()
|
||||
: 1};
|
||||
|
||||
Reference in New Issue
Block a user