Added a safety switch to cold storage tracking

This commit is contained in:
Rick Falkvinge
2018-06-27 22:20:49 +02:00
parent 9613d0bed4
commit 68f925b5bd
+7
View File
@@ -923,6 +923,8 @@ namespace Swarmops.Logic.Financial
}
}
DateTime ledgersClosedUntil = new DateTime(organization.Parameters.FiscalBooksClosedUntilYear + 1, 1, 1);
foreach (BlockchainTransaction blockchainTx in transactions)
{
@@ -931,6 +933,11 @@ namespace Swarmops.Logic.Financial
continue; // do not process transactions before forkdate DateTime
}
if (blockchainTx.TransactionDateTimeUtc < ledgersClosedUntil)
{
continue; // do not attempt to write into closedledger space
}
FinancialTransaction ourTx = null;
Dictionary<Int64, Int64> satoshisLookup = new Dictionary<long, long>();
// map from ledgercents to satoshis