mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-28 01:27:58 +00:00
the state diff method belongs to node interactions (#20)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -279,6 +279,16 @@ impl EthereumNode for KitchensinkNode {
|
||||
.await?)
|
||||
}))
|
||||
}
|
||||
|
||||
fn state_diff(&self, transaction: TransactionReceipt) -> anyhow::Result<DiffMode> {
|
||||
match self
|
||||
.trace_transaction(transaction)?
|
||||
.try_into_pre_state_frame()?
|
||||
{
|
||||
PreStateFrame::Diff(diff) => Ok(diff),
|
||||
_ => anyhow::bail!("expected a diff mode trace"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Node for KitchensinkNode {
|
||||
@@ -317,16 +327,6 @@ impl Node for KitchensinkNode {
|
||||
self.init(&genesis)?.spawn_process()
|
||||
}
|
||||
|
||||
fn state_diff(&self, transaction: TransactionReceipt) -> anyhow::Result<DiffMode> {
|
||||
match self
|
||||
.trace_transaction(transaction)?
|
||||
.try_into_pre_state_frame()?
|
||||
{
|
||||
PreStateFrame::Diff(diff) => Ok(diff),
|
||||
_ => anyhow::bail!("expected a diff mode trace"),
|
||||
}
|
||||
}
|
||||
|
||||
fn version(&self) -> anyhow::Result<String> {
|
||||
let output = Command::new(&self.substrate_binary)
|
||||
.arg("--version")
|
||||
|
||||
Reference in New Issue
Block a user