Implement eth/64 (EIP-2364) and drop support for eth/62 (#11472)

* sync: make code friendlier to future conditional parsing

* Implement eth/64 (EIP-2364) and drop support for eth/62
This commit is contained in:
Artem Vorotnikov
2020-02-19 16:42:52 +03:00
committed by GitHub
parent a49950e9c0
commit 06df521eff
18 changed files with 318 additions and 410 deletions

View File

@@ -14,9 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
use std::sync::{Arc, mpsc};
use std::{collections::BTreeSet, sync::{Arc, mpsc}};
use client_traits::{BlockChainClient, ChainNotify};
use types::BlockNumber;
use sync::{self, SyncConfig, NetworkConfiguration, Params, ConnectionFilter};
use snapshot::SnapshotService;
use ethcore_private_tx::PrivateStateDB;
@@ -38,6 +39,7 @@ pub fn sync(
executor: Executor,
network_config: NetworkConfiguration,
chain: Arc<dyn BlockChainClient>,
forks: BTreeSet<BlockNumber>,
snapshot_service: Arc<dyn SnapshotService>,
private_tx_handler: Option<Arc<dyn PrivateTxHandler>>,
private_state: Option<Arc<PrivateStateDB>>,
@@ -49,6 +51,7 @@ pub fn sync(
config,
executor,
chain,
forks,
provider,
snapshot_service,
private_tx_handler,

View File

@@ -576,6 +576,7 @@ fn execute_impl<Cr, Rr>(
cmd.private_encryptor_conf,
).map_err(|e| format!("Client service error: {:?}", e))?;
let forks = spec.hard_forks.clone();
let connection_filter_address = spec.params().node_permission_contract;
// drop the spec to free up genesis state.
drop(spec);
@@ -651,6 +652,7 @@ fn execute_impl<Cr, Rr>(
runtime.executor(),
net_conf.clone().into(),
client.clone(),
forks,
snapshot_service.clone(),
private_tx_sync,
private_state,