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
0f84b9c3
Commit
0f84b9c3
authored
Aug 04, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added exist method
parent
342cc122
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
pipe.go
ethpipe/pipe.go
+4
-0
pipe_test.go
ethpipe/pipe_test.go
+1
-0
No files found.
ethpipe/pipe.go
View file @
0f84b9c3
...
...
@@ -75,6 +75,10 @@ func (self *Pipe) ToAddress(priv []byte) []byte {
return
pair
.
Address
()
}
func
(
self
*
Pipe
)
Exists
(
addr
[]
byte
)
bool
{
return
self
.
World
()
.
Get
(
addr
)
!=
nil
}
func
(
self
*
Pipe
)
TransactString
(
key
*
ethcrypto
.
KeyPair
,
rec
string
,
value
,
gas
,
price
*
ethutil
.
Value
,
data
[]
byte
)
error
{
// Check if an address is stored by this address
var
hash
[]
byte
...
...
ethpipe/pipe_test.go
View file @
0f84b9c3
...
...
@@ -34,6 +34,7 @@ func TestNew(t *testing.T) {
pipe
.
Block
(
addr
)
pipe
.
Storage
(
addr
,
addr
)
pipe
.
ToAddress
(
privy
)
pipe
.
Exists
(
addr
)
// Doesn't change state
pipe
.
Execute
(
addr
,
nil
,
Val
(
0
),
Val
(
1000000
),
Val
(
10
))
// Doesn't change state
...
...
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