private void SetNextLedger(SignedLedger signed) { Debug.Assert(ValidateSignedLedgerInternal(signed)); Debug.Assert(ValidateSignatures(signed)); Finalize(signed, CreateLedgerState(signed)); needSetInitialLedger = false; var time = TimeFormat.ToDateTime(signed.GetTimestamp()); Console.WriteLine($"Ledger Finalized. Height : {signed.Ledger.LedgerLight.Height} Timestamp : {time} Transactions : {signed.Ledger.Block.Transactions.Count()} "); }
public void Notify(SignedLedger ledger) { foreach (var subscriptor in subscriptors) { var notification = new ConfirmationNotification() { Hash = ledger.Hash.ToBase64(), Height = ledger.GetHeight(), Timestamp = ledger.GetTimestamp(), Transactions = GetTransactions(subscriptor.Value, ledger) }; Send(subscriptor.Key, new NotificationMessage(notification)); } }
public void Notify(SignedLedger ledger) { foreach (var subscriptor in subscriptors) { var notification = new LedgerNotification() { Hash = ledger.Hash.ToBase64(), Height = ledger.GetHeight(), Timestamp = ledger.GetTimestamp(), Transactions = ledger.Ledger.Block.Transactions.Count() }; Send(subscriptor, new NotificationMessage(notification)); } }