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
38faf2c5
Commit
38faf2c5
authored
Feb 12, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed messages
parent
31fdc645
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
87 deletions
+2
-87
ext_app.go
cmd/mist/ext_app.go
+0
-26
html_container.go
cmd/mist/html_container.go
+0
-14
qml_container.go
cmd/mist/qml_container.go
+0
-6
database.go
ethdb/database.go
+2
-2
types.go
xeth/types.go
+0
-30
xeth.go
xeth/xeth.go
+0
-9
No files found.
cmd/mist/ext_app.go
View file @
38faf2c5
...
...
@@ -24,7 +24,6 @@ import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/ui/qt"
"github.com/ethereum/go-ethereum/xeth"
"github.com/obscuren/qml"
...
...
@@ -39,7 +38,6 @@ type AppContainer interface {
NewBlock
(
*
types
.
Block
)
NewWatcher
(
chan
bool
)
Messages
(
state
.
Messages
,
string
)
Post
(
string
,
int
)
}
...
...
@@ -79,10 +77,6 @@ func (app *ExtApplication) run() {
return
}
// Subscribe to events
mux
:=
app
.
lib
.
eth
.
EventMux
()
app
.
events
=
mux
.
Subscribe
(
core
.
NewBlockEvent
{},
state
.
Messages
(
nil
))
// Call the main loop
go
app
.
mainLoop
()
...
...
@@ -126,23 +120,3 @@ func (app *ExtApplication) mainLoop() {
func
(
self
*
ExtApplication
)
Watch
(
filterOptions
map
[
string
]
interface
{},
identifier
string
)
{
self
.
filters
[
identifier
]
=
qt
.
NewFilterFromMap
(
filterOptions
,
self
.
eth
)
}
func
(
self
*
ExtApplication
)
GetMessages
(
object
map
[
string
]
interface
{})
string
{
/* TODO remove me
filter := qt.NewFilterFromMap(object, self.eth)
messages := filter.Find()
var msgs []javascript.JSMessage
for _, m := range messages {
msgs = append(msgs, javascript.NewJSMessage(m))
}
b, err := json.Marshal(msgs)
if err != nil {
return "{\"error\":" + err.Error() + "}"
}
return string(b)
*/
return
""
}
cmd/mist/html_container.go
View file @
38faf2c5
...
...
@@ -31,7 +31,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/xeth"
"github.com/howeyc/fsnotify"
"github.com/obscuren/qml"
...
...
@@ -144,19 +143,6 @@ func (app *HtmlApplication) NewBlock(block *types.Block) {
app
.
webView
.
Call
(
"onNewBlockCb"
,
b
)
}
func
(
self
*
HtmlApplication
)
Messages
(
messages
state
.
Messages
,
id
string
)
{
/* TODO remove me
var msgs []javascript.JSMessage
for _, m := range messages {
msgs = append(msgs, javascript.NewJSMessage(m))
}
b, _ := json.Marshal(msgs)
self.webView.Call("onWatchedCb", string(b), id)
*/
}
func
(
app
*
HtmlApplication
)
Destroy
()
{
app
.
engine
.
Destroy
()
}
...
...
cmd/mist/qml_container.go
View file @
38faf2c5
...
...
@@ -22,12 +22,10 @@
package
main
import
(
"fmt"
"runtime"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/xeth"
"github.com/obscuren/qml"
)
...
...
@@ -74,10 +72,6 @@ func (app *QmlApplication) NewBlock(block *types.Block) {
app
.
win
.
Call
(
"onNewBlockCb"
,
pblock
)
}
func
(
self
*
QmlApplication
)
Messages
(
msgs
state
.
Messages
,
id
string
)
{
fmt
.
Println
(
"IMPLEMENT QML APPLICATION MESSAGES METHOD"
)
}
// Getters
func
(
app
*
QmlApplication
)
Engine
()
*
qml
.
Engine
{
return
app
.
engine
...
...
ethdb/database.go
View file @
38faf2c5
package
ethdb
import
(
"fmt"
"path"
"fmt"
"github.com/ethereum/go-ethereum/compression/rle"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/compression/rle"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
)
...
...
xeth/types.go
View file @
38faf2c5
...
...
@@ -235,33 +235,3 @@ func NewReciept(contractCreation bool, creationAddress, hash, address []byte) *R
toHex
(
address
),
}
}
type
Message
struct
{
To
string
`json:"to"`
From
string
`json:"from"`
Input
string
`json:"input"`
Output
string
`json:"output"`
Path
int32
`json:"path"`
Origin
string
`json:"origin"`
Timestamp
int32
`json:"timestamp"`
Coinbase
string
`json:"coinbase"`
Block
string
`json:"block"`
Number
int32
`json:"number"`
Value
string
`json:"value"`
}
func
NewMessage
(
message
*
state
.
Message
)
Message
{
return
Message
{
To
:
toHex
(
message
.
To
),
From
:
toHex
(
message
.
From
),
Input
:
toHex
(
message
.
Input
),
Output
:
toHex
(
message
.
Output
),
Path
:
int32
(
message
.
Path
),
Origin
:
toHex
(
message
.
Origin
),
Timestamp
:
int32
(
message
.
Timestamp
),
Coinbase
:
toHex
(
message
.
Origin
),
Block
:
toHex
(
message
.
Block
),
Number
:
int32
(
message
.
Number
.
Int64
()),
Value
:
message
.
Value
.
String
(),
}
}
xeth/xeth.go
View file @
38faf2c5
...
...
@@ -192,15 +192,6 @@ func (self *XEth) FromNumber(str string) string {
return
ethutil
.
BigD
(
fromHex
(
str
))
.
String
()
}
func
ToMessages
(
messages
state
.
Messages
)
*
ethutil
.
List
{
var
msgs
[]
Message
for
_
,
m
:=
range
messages
{
msgs
=
append
(
msgs
,
NewMessage
(
m
))
}
return
ethutil
.
NewList
(
msgs
)
}
func
(
self
*
XEth
)
PushTx
(
encodedTx
string
)
(
string
,
error
)
{
tx
:=
types
.
NewTransactionFromBytes
(
fromHex
(
encodedTx
))
err
:=
self
.
eth
.
TxPool
()
.
Add
(
tx
)
...
...
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