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
623469cb
Commit
623469cb
authored
Feb 03, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing whisper timestamp. Closes #284
parent
663d7250
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
statedb.go
state/statedb.go
+2
-5
message.go
whisper/message.go
+1
-0
whisper.go
xeth/whisper.go
+2
-2
No files found.
state/statedb.go
View file @
623469cb
...
...
@@ -31,7 +31,7 @@ type StateDB struct {
// Create a new state from a given trie
func
New
(
root
[]
byte
,
db
ethutil
.
Database
)
*
StateDB
{
trie
:=
trie
.
New
(
root
,
db
)
trie
:=
trie
.
New
(
ethutil
.
CopyBytes
(
root
)
,
db
)
return
&
StateDB
{
db
:
db
,
trie
:
trie
,
stateObjects
:
make
(
map
[
string
]
*
StateObject
),
manifest
:
NewManifest
(),
refund
:
make
(
map
[
string
]
*
big
.
Int
)}
}
...
...
@@ -234,12 +234,9 @@ func (self *StateDB) Copy() *StateDB {
}
func
(
self
*
StateDB
)
Set
(
state
*
StateDB
)
{
if
state
==
nil
{
panic
(
"Tried setting 'state' to nil through 'Set'"
)
}
self
.
trie
=
state
.
trie
self
.
stateObjects
=
state
.
stateObjects
self
.
refund
=
state
.
refund
self
.
logs
=
state
.
logs
}
...
...
whisper/message.go
View file @
623469cb
...
...
@@ -11,6 +11,7 @@ type Message struct {
Flags
byte
Signature
[]
byte
Payload
[]
byte
Sent
uint64
}
func
NewMessage
(
payload
[]
byte
)
*
Message
{
...
...
xeth/whisper.go
View file @
623469cb
...
...
@@ -99,16 +99,16 @@ type Options struct {
type
WhisperMessage
struct
{
ref
*
whisper
.
Message
Flags
int32
`json:"flags"`
Payload
string
`json:"payload"`
From
string
`json:"from"`
Sent
uint64
`json:"time"`
}
func
NewWhisperMessage
(
msg
*
whisper
.
Message
)
WhisperMessage
{
return
WhisperMessage
{
ref
:
msg
,
Flags
:
int32
(
msg
.
Flags
),
Payload
:
"0x"
+
ethutil
.
Bytes2Hex
(
msg
.
Payload
),
From
:
"0x"
+
ethutil
.
Bytes2Hex
(
crypto
.
FromECDSAPub
(
msg
.
Recover
())),
Sent
:
msg
.
Sent
,
}
}
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