v2.5.8-stable (#11041)
* add more tx tests (#11038) * Fix parallel transactions race-condition (#10995) * Add blake2_f precompile (#11017) * [trace] introduce trace failed to Ext (#11019) * Edit publish-onchain.sh to use https (#11016) * Fix deadlock in network-devp2p (#11013) * EIP 1108: Reduce alt_bn128 precompile gas costs (#11008) * xDai chain support and nodes list update (#10989) * EIP 2028: transaction gas lowered from 68 to 16 (#10987) * EIP-1344 Add CHAINID op-code (#10983) * manual publish jobs for releases, no changes for nightlies (#10977) * [blooms-db] Fix benchmarks (#10974) * Verify transaction against its block during import (#10954) * Better error message for rpc gas price errors (#10931) * tx-pool: accept local tx with higher gas price when pool full (#10901) * Fix fork choice (#10837) * Cleanup unused vm dependencies (#10787) * Fix compilation on recent nightlies (#10991)
This commit is contained in:
@@ -67,6 +67,8 @@ pub struct FakeExt {
|
||||
pub balances: HashMap<Address, U256>,
|
||||
pub tracing: bool,
|
||||
pub is_static: bool,
|
||||
|
||||
chain_id: u64,
|
||||
}
|
||||
|
||||
// similar to the normal `finalize` function, but ignoring NeedsReturn.
|
||||
@@ -98,11 +100,24 @@ impl FakeExt {
|
||||
ext
|
||||
}
|
||||
|
||||
/// New fake externalities with Istanbul schedule rules
|
||||
pub fn new_istanbul() -> Self {
|
||||
let mut ext = FakeExt::default();
|
||||
ext.schedule = Schedule::new_istanbul();
|
||||
ext
|
||||
}
|
||||
|
||||
/// Alter fake externalities to allow wasm
|
||||
pub fn with_wasm(mut self) -> Self {
|
||||
self.schedule.wasm = Some(Default::default());
|
||||
self
|
||||
}
|
||||
|
||||
/// Set chain ID
|
||||
pub fn with_chain_id(mut self, chain_id: u64) -> Self {
|
||||
self.chain_id = chain_id;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Ext for FakeExt {
|
||||
@@ -200,7 +215,7 @@ impl Ext for FakeExt {
|
||||
|
||||
fn log(&mut self, topics: Vec<H256>, data: &[u8]) -> Result<()> {
|
||||
self.logs.push(FakeLogEntry {
|
||||
topics: topics,
|
||||
topics,
|
||||
data: data.to_vec()
|
||||
});
|
||||
Ok(())
|
||||
@@ -223,6 +238,10 @@ impl Ext for FakeExt {
|
||||
&self.info
|
||||
}
|
||||
|
||||
fn chain_id(&self) -> u64 {
|
||||
self.chain_id
|
||||
}
|
||||
|
||||
fn depth(&self) -> usize {
|
||||
self.depth
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user