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
6c7255cd
Commit
6c7255cd
authored
Feb 24, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a minor issue on crashed contracts
parent
f2234264
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
block.go
ethchain/block.go
+3
-2
contract.go
ethchain/contract.go
+3
-0
No files found.
ethchain/block.go
View file @
6c7255cd
...
@@ -221,8 +221,9 @@ func (block *Block) Undo() {
...
@@ -221,8 +221,9 @@ func (block *Block) Undo() {
func
(
block
*
Block
)
MakeContract
(
tx
*
Transaction
)
{
func
(
block
*
Block
)
MakeContract
(
tx
*
Transaction
)
{
contract
:=
MakeContract
(
tx
,
NewState
(
block
.
state
))
contract
:=
MakeContract
(
tx
,
NewState
(
block
.
state
))
if
contract
!=
nil
{
block
.
contractStates
[
string
(
tx
.
Hash
()[
12
:
])]
=
contract
.
state
block
.
contractStates
[
string
(
tx
.
Hash
()[
12
:
])]
=
contract
.
state
}
}
}
/////// Block Encoding
/////// Block Encoding
...
...
ethchain/contract.go
View file @
6c7255cd
package
ethchain
package
ethchain
import
(
import
(
"fmt"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethutil"
"math/big"
"math/big"
)
)
...
@@ -65,6 +66,8 @@ func MakeContract(tx *Transaction, state *State) *Contract {
...
@@ -65,6 +66,8 @@ func MakeContract(tx *Transaction, state *State) *Contract {
state
.
trie
.
Update
(
string
(
addr
),
string
(
contract
.
RlpEncode
()))
state
.
trie
.
Update
(
string
(
addr
),
string
(
contract
.
RlpEncode
()))
return
contract
return
contract
}
else
{
fmt
.
Println
(
"NO CONTRACT"
)
}
}
return
nil
return
nil
...
...
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