From a84a10ff03b26fdb9d4706adba2ee4685b4244cb Mon Sep 17 00:00:00 2001 From: keorn Date: Wed, 8 Mar 2017 14:44:07 +0100 Subject: [PATCH] Add replay protection (#4808) * add eip155 * make network_id default --- ethcore/src/engines/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 2320f49a0..2cc1ff21f 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -166,7 +166,9 @@ pub trait Engine : Sync + Send { } /// The network ID that transactions should be signed with. - fn signing_network_id(&self, _env_info: &EnvInfo) -> Option { None } + fn signing_network_id(&self, _env_info: &EnvInfo) -> Option { + Some(self.params().chain_id) + } /// Verify the seal of a block. This is an auxilliary method that actually just calls other `verify_` methods /// to get the job done. By default it must pass `verify_basic` and `verify_block_unordered`. If more or fewer