2018-06-04 10:19:50 +02:00
|
|
|
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
|
|
|
// This file is part of Parity.
|
|
|
|
|
|
|
|
// Parity is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
|
|
// Parity is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-02-27 10:19:33 +01:00
|
|
|
use std::collections::HashMap;
|
2018-06-20 15:13:07 +02:00
|
|
|
use ethereum_types::{H256, Bloom};
|
2016-02-27 02:16:39 +01:00
|
|
|
use header::BlockNumber;
|
|
|
|
use blockchain::block_info::BlockInfo;
|
2018-02-19 10:52:33 +01:00
|
|
|
use blockchain::extras::{BlockDetails, BlockReceipts, TransactionAddress};
|
2018-07-30 11:45:10 +02:00
|
|
|
use encoded::Block;
|
2016-02-27 02:16:39 +01:00
|
|
|
|
|
|
|
/// Block extras update info.
|
2018-07-30 11:45:10 +02:00
|
|
|
pub struct ExtrasUpdate {
|
2016-02-27 02:16:39 +01:00
|
|
|
/// Block info.
|
|
|
|
pub info: BlockInfo,
|
2016-07-28 23:46:24 +02:00
|
|
|
/// Current block uncompressed rlp bytes
|
2018-07-30 11:45:10 +02:00
|
|
|
pub block: Block,
|
2016-02-27 10:21:44 +01:00
|
|
|
/// Modified block hashes.
|
2016-02-27 10:19:33 +01:00
|
|
|
pub block_hashes: HashMap<BlockNumber, H256>,
|
2016-02-27 10:21:44 +01:00
|
|
|
/// Modified block details.
|
2016-02-27 10:19:33 +01:00
|
|
|
pub block_details: HashMap<H256, BlockDetails>,
|
2016-02-27 10:21:44 +01:00
|
|
|
/// Modified block receipts.
|
2016-02-27 10:19:33 +01:00
|
|
|
pub block_receipts: HashMap<H256, BlockReceipts>,
|
2018-03-12 21:15:55 +01:00
|
|
|
/// Modified blocks blooms.
|
2018-06-20 15:13:07 +02:00
|
|
|
pub blocks_blooms: Option<(u64, Vec<Bloom>)>,
|
2016-09-28 15:49:42 +02:00
|
|
|
/// Modified transaction addresses (None signifies removed transactions).
|
|
|
|
pub transactions_addresses: HashMap<H256, Option<TransactionAddress>>,
|
2016-02-27 02:16:39 +01:00
|
|
|
}
|
2018-05-16 08:58:01 +02:00
|
|
|
|
|
|
|
/// Extra information in block insertion.
|
|
|
|
pub struct ExtrasInsert {
|
|
|
|
/// The primitive fork choice before applying finalization rules.
|
|
|
|
pub fork_choice: ::engines::ForkChoice,
|
|
|
|
/// Is the inserted block considered finalized.
|
|
|
|
pub is_finalized: bool,
|
|
|
|
}
|