Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parity-test-sync
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
parity-test-sync
Commits
c85cabb5
Commit
c85cabb5
authored
9 years ago
by
Gav Wood
Browse files
Options
Downloads
Patches
Plain Diff
Additional notes.
parent
ff74e823
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.rs
+6
-1
6 additions, 1 deletion
src/engine.rs
with
6 additions
and
1 deletion
src/engine.rs
+
6
−
1
View file @
c85cabb5
...
...
@@ -29,7 +29,7 @@ pub trait Engine {
/// Get the general parameters of the chain.
fn
spec
(
&
self
)
->
&
Spec
;
/// Get the EVM schedule for
/// Get the EVM schedule for
the given `env_info`.
fn
evm_schedule
(
&
self
,
env_info
:
&
EnvInfo
)
->
EvmSchedule
;
/// Some intrinsic operation parameters; by default they take their value from the `spec()`'s `engine_params`.
...
...
@@ -45,13 +45,16 @@ pub trait Engine {
/// Verify that `header` is valid.
/// `parent` (the parent header) and `block` (the header's full block) may be provided for additional
/// checks. Returns either a null `Ok` or a general error detailing the problem with import.
// TODO: consider including State in the params.
fn
verify
(
&
self
,
_header
:
&
Header
,
_parent
:
Option
<&
Header
>
,
_block
:
Option
<&
[
u8
]
>
)
->
Result
<
(),
EthcoreError
>
{
Ok
(())
}
/// Additional verification for transactions in blocks.
// TODO: Add flags for which bits of the transaction to check.
// TODO: consider including State in the params.
fn
verify_transaction
(
&
self
,
_t
:
&
Transaction
,
_header
:
&
Header
)
->
Result
<
(),
EthcoreError
>
{
Ok
(())
}
/// Don't forget to call Super::populateFromParent when subclassing & overriding.
// TODO: consider including State in the params.
fn
populate_from_parent
(
&
self
,
_header
:
&
mut
Header
,
_parent
:
&
Header
)
->
Result
<
(),
EthcoreError
>
{
Ok
(())
}
// TODO: buildin contract routing - to do this properly, it will require removing the built-in configuration-reading logic
...
...
@@ -60,4 +63,6 @@ pub trait Engine {
fn cost_of_builtin(&self, a: Address, in: &[u8]) -> bignum;
fn execute_builtin(&self, a: Address, in: &[u8], out: &mut [u8]);
*/
// TODO: sealing stuff - though might want to leave this for later.
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment