()
| 474 | } |
| 475 | |
| 476 | func (e *engine) updateSnapshot() { |
| 477 | e.snapshotMu.Lock() |
| 478 | defer e.snapshotMu.Unlock() |
| 479 | |
| 480 | e.snapshotBlock = types.NewBlock( |
| 481 | e.currentWork.header, |
| 482 | e.currentWork.txs, |
| 483 | e.currentWork.pubReceipts, |
| 484 | ) |
| 485 | e.snapshotState = e.currentWork.pubState.Copy() |
| 486 | // TODO: if need to snapshot private state? |
| 487 | } |
| 488 | |
| 489 | // transactions are applied in ascending nonce order of each account. |
| 490 | func (w *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsByPriceAndNonce, bc *core.BlockChain, coinbase common.Address, breakTimer time.Time) { |
no test coverage detected