Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
f911087e
Commit
f911087e
authored
Jun 18, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logging
parent
c4af1340
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
state_transition.go
ethchain/state_transition.go
+5
-3
No files found.
ethchain/state_transition.go
View file @
f911087e
...
...
@@ -89,7 +89,7 @@ func (self *StateTransition) BuyGas() error {
sender
:=
self
.
Sender
()
if
sender
.
Amount
.
Cmp
(
self
.
tx
.
GasValue
())
<
0
{
return
fmt
.
Errorf
(
"Insufficient funds to pre-pay gas. Req %v, has %v"
,
self
.
tx
.
GasValue
(),
se
lf
.
tx
.
Value
)
return
fmt
.
Errorf
(
"Insufficient funds to pre-pay gas. Req %v, has %v"
,
self
.
tx
.
GasValue
(),
se
nder
.
Amount
)
}
coinbase
:=
self
.
Coinbase
()
...
...
@@ -181,7 +181,8 @@ func (self *StateTransition) TransitionState() (err error) {
// Evaluate the initialization script
// and use the return value as the
// script section for the state object.
//script, gas, err = sm.Eval(state, contract.Init(), contract, tx, block)
ethutil
.
Config
.
Log
.
Println
(
ethutil
.
LogLevelSystem
,
receiver
.
Init
())
code
,
err
:=
self
.
Eval
(
receiver
.
Init
(),
receiver
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Error during init script run %v"
,
err
)
...
...
@@ -190,7 +191,8 @@ func (self *StateTransition) TransitionState() (err error) {
receiver
.
script
=
code
}
else
{
if
len
(
receiver
.
Script
())
>
0
{
fmt
.
Println
(
receiver
.
Script
())
ethutil
.
Config
.
Log
.
Println
(
ethutil
.
LogLevelSystem
,
receiver
.
Script
())
_
,
err
:=
self
.
Eval
(
receiver
.
Script
(),
receiver
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Error during code execution %v"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment