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
936ddf2a
Commit
936ddf2a
authored
Apr 01, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #616 from bas-vk/develop
Frontier/513
parents
dba9b83a
1559bd9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
xeth.go
xeth/xeth.go
+7
-6
No files found.
xeth/xeth.go
View file @
936ddf2a
...
...
@@ -129,8 +129,8 @@ func cTopics(t [][]string) [][]common.Hash {
return
topics
}
func
(
self
*
XEth
)
DefaultGas
()
*
big
.
Int
{
return
defaultGas
}
func
(
self
*
XEth
)
DefaultGasPrice
()
*
big
.
Int
{
return
defaultGasPrice
}
func
(
self
*
XEth
)
DefaultGas
()
*
big
.
Int
{
return
new
(
big
.
Int
)
.
Set
(
defaultGas
)
}
func
(
self
*
XEth
)
DefaultGasPrice
()
*
big
.
Int
{
return
new
(
big
.
Int
)
.
Set
(
defaultGasPrice
)
}
func
(
self
*
XEth
)
RemoteMining
()
*
miner
.
RemoteAgent
{
return
self
.
agent
}
...
...
@@ -565,12 +565,13 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
value
:
common
.
Big
(
valueStr
),
data
:
common
.
FromHex
(
dataStr
),
}
if
msg
.
gas
.
Cmp
(
big
.
NewInt
(
0
))
==
0
{
msg
.
gas
=
defaultGas
msg
.
gas
=
self
.
DefaultGas
()
}
if
msg
.
gasPrice
.
Cmp
(
big
.
NewInt
(
0
))
==
0
{
msg
.
gasPrice
=
defaultGasPrice
msg
.
gasPrice
=
self
.
DefaultGasPrice
()
}
block
:=
self
.
CurrentBlock
()
...
...
@@ -616,11 +617,11 @@ func (self *XEth) Transact(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeSt
// TODO: align default values to have the same type, e.g. not depend on
// common.Value conversions later on
if
gas
.
Cmp
(
big
.
NewInt
(
0
))
==
0
{
gas
=
defaultGas
gas
=
self
.
DefaultGas
()
}
if
price
.
Cmp
(
big
.
NewInt
(
0
))
==
0
{
price
=
defaultGasPrice
price
=
self
.
DefaultGasPrice
()
}
data
=
common
.
FromHex
(
codeStr
)
...
...
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