Commit ba5de87c authored by Sergei Zubov's avatar Sergei Zubov

Add logs for transaction lifecycle

parent fbda97d6
Pipeline #1127 passed with stage
in 3 minutes and 49 seconds
......@@ -103,6 +103,8 @@ namespace Stratis.Bitcoin.Features.MemoryPool
this.PerformanceCounter.SetMempoolSize(state.MempoolSize);
this.PerformanceCounter.SetMempoolDynamicSize(state.MempoolDynamicSize);
this.PerformanceCounter.AddHitCount(1);
this.logger.LogInformation("Transaction {txId} validated by mempool", tx.GetHash());
});
}
......
......@@ -382,6 +382,7 @@ namespace Stratis.Bitcoin.Features.MemoryPool
{
this.filterInventoryKnown.Add(trxHash);
}
this.logger.LogInformation("Received transaction {txId}. Transaction hex: '{txHex}'", trxHash, trx.ToHex());
this.logger.LogTrace("Added transaction ID '{0}' to known inventory filter.", trxHash);
var state = new MempoolValidationState(true);
......
......@@ -103,6 +103,9 @@ namespace Stratis.Bitcoin.Features.Miner.Staking
"Node staking with {0} ({1:0.00} % of the network weight {2}), est. time to find new block is {3}.",
new Money(ourWeight), ourPercent, new Money(this.networkWeight), TimeSpan.FromSeconds(expectedTime));
this.logger.LogInformation("Staking block with transactions: {txIds}",
block.Transactions.Select(p => p.GetHash()).ToList());
this.rpcGetStakingInfoModel.ResumeStaking(ourWeight, expectedTime);
long minimalAllowedTime = chainTip.Header.Time + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment