void HandleNewBestBlock(object sender, NewBestBlockEventArgs a) { lock (DataLock) { var index = Blockchains.IndexOf((Blockchain)sender); BlockchainsBestBlock[index] = a.Block; // Signal as newest block b/c lazy for a second... BestBlock = a.Block; NewBestBlock?.Invoke(this, new NewBestBlockEventArgs(BestBlock)); } }
void ProcessBlockPayload(BlockPayload payload) { Algorithms.CheckProofOfWork(payload, Connection.NetworkConfig); // Signal as newest block b/c lazy for a second... NewBestBlock?.Invoke(this, new NewBestBlockEventArgs(payload)); }