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
54715586
Commit
54715586
authored
Jul 12, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed sha3 to official one
parent
90108576
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
vm.go
ethchain/vm.go
+3
-2
crypto.go
ethcrypto/crypto.go
+1
-1
No files found.
ethchain/vm.go
View file @
54715586
...
...
@@ -690,14 +690,15 @@ func (vm *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
contract
.
AddAmount
(
value
)
// Set the init script
contract
.
initScript
=
mem
.
Get
(
offset
.
Int64
(),
size
.
Int64
())
initCode
:=
mem
.
Get
(
offset
.
Int64
(),
size
.
Int64
())
//fmt.Printf("%x\n", initCode)
// Transfer all remaining gas to the new
// contract so it may run the init script
gas
:=
new
(
big
.
Int
)
.
Set
(
closure
.
Gas
)
closure
.
UseGas
(
closure
.
Gas
)
// Create the closure
c
:=
NewClosure
(
closure
,
contract
,
contract
.
initScript
,
vm
.
state
,
gas
,
closure
.
Price
)
c
:=
NewClosure
(
closure
,
contract
,
initCode
,
vm
.
state
,
gas
,
closure
.
Price
)
// Call the closure and set the return value as
// main script.
contract
.
script
,
err
=
Call
(
vm
,
c
,
nil
)
...
...
ethcrypto/crypto.go
View file @
54715586
...
...
@@ -2,9 +2,9 @@ package ethcrypto
import
(
"code.google.com/p/go.crypto/ripemd160"
"code.google.com/p/go.crypto/sha3"
"crypto/sha256"
"github.com/ethereum/eth-go/ethutil"
"github.com/obscuren/sha3"
)
func
Sha256Bin
(
data
[]
byte
)
[]
byte
{
...
...
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