Skip to content

Commit 38faf2c

Browse files
committed
removed messages
1 parent 31fdc64 commit 38faf2c

6 files changed

Lines changed: 2 additions & 87 deletions

File tree

‎cmd/mist/ext_app.go‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"github.com/ethereum/go-ethereum/core"
2525
"github.com/ethereum/go-ethereum/core/types"
2626
"github.com/ethereum/go-ethereum/event"
27-
"github.com/ethereum/go-ethereum/state"
2827
"github.com/ethereum/go-ethereum/ui/qt"
2928
"github.com/ethereum/go-ethereum/xeth"
3029
"github.com/obscuren/qml"
@@ -39,7 +38,6 @@ type AppContainer interface {
3938

4039
NewBlock(*types.Block)
4140
NewWatcher(chan bool)
42-
Messages(state.Messages, string)
4341
Post(string, int)
4442
}
4543

@@ -79,10 +77,6 @@ func (app *ExtApplication) run() {
7977
return
8078
}
8179

82-
// Subscribe to events
83-
mux := app.lib.eth.EventMux()
84-
app.events = mux.Subscribe(core.NewBlockEvent{}, state.Messages(nil))
85-
8680
// Call the main loop
8781
go app.mainLoop()
8882

@@ -126,23 +120,3 @@ func (app *ExtApplication) mainLoop() {
126120
func (self *ExtApplication) Watch(filterOptions map[string]interface{}, identifier string) {
127121
self.filters[identifier] = qt.NewFilterFromMap(filterOptions, self.eth)
128122
}
129-
130-
func (self *ExtApplication) GetMessages(object map[string]interface{}) string {
131-
/* TODO remove me
132-
filter := qt.NewFilterFromMap(object, self.eth)
133-
134-
messages := filter.Find()
135-
var msgs []javascript.JSMessage
136-
for _, m := range messages {
137-
msgs = append(msgs, javascript.NewJSMessage(m))
138-
}
139-
140-
b, err := json.Marshal(msgs)
141-
if err != nil {
142-
return "{\"error\":" + err.Error() + "}"
143-
}
144-
145-
return string(b)
146-
*/
147-
return ""
148-
}

‎cmd/mist/html_container.go‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131

3232
"github.com/ethereum/go-ethereum/core/types"
3333
"github.com/ethereum/go-ethereum/ethutil"
34-
"github.com/ethereum/go-ethereum/state"
3534
"github.com/ethereum/go-ethereum/xeth"
3635
"github.com/howeyc/fsnotify"
3736
"github.com/obscuren/qml"
@@ -144,19 +143,6 @@ func (app *HtmlApplication) NewBlock(block *types.Block) {
144143
app.webView.Call("onNewBlockCb", b)
145144
}
146145

147-
func (self *HtmlApplication) Messages(messages state.Messages, id string) {
148-
/* TODO remove me
149-
var msgs []javascript.JSMessage
150-
for _, m := range messages {
151-
msgs = append(msgs, javascript.NewJSMessage(m))
152-
}
153-
154-
b, _ := json.Marshal(msgs)
155-
156-
self.webView.Call("onWatchedCb", string(b), id)
157-
*/
158-
}
159-
160146
func (app *HtmlApplication) Destroy() {
161147
app.engine.Destroy()
162148
}

‎cmd/mist/qml_container.go‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
package main
2323

2424
import (
25-
"fmt"
2625
"runtime"
2726

2827
"github.com/ethereum/go-ethereum/core/types"
2928
"github.com/ethereum/go-ethereum/ethutil"
30-
"github.com/ethereum/go-ethereum/state"
3129
"github.com/ethereum/go-ethereum/xeth"
3230
"github.com/obscuren/qml"
3331
)
@@ -74,10 +72,6 @@ func (app *QmlApplication) NewBlock(block *types.Block) {
7472
app.win.Call("onNewBlockCb", pblock)
7573
}
7674

77-
func (self *QmlApplication) Messages(msgs state.Messages, id string) {
78-
fmt.Println("IMPLEMENT QML APPLICATION MESSAGES METHOD")
79-
}
80-
8175
// Getters
8276
func (app *QmlApplication) Engine() *qml.Engine {
8377
return app.engine

‎ethdb/database.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package ethdb
22

33
import (
4-
"fmt"
54
"path"
5+
"fmt"
66

7-
"github.com/ethereum/go-ethereum/compression/rle"
87
"github.com/ethereum/go-ethereum/ethutil"
8+
"github.com/ethereum/go-ethereum/compression/rle"
99
"github.com/syndtr/goleveldb/leveldb"
1010
"github.com/syndtr/goleveldb/leveldb/iterator"
1111
)

‎xeth/types.go‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -235,33 +235,3 @@ func NewReciept(contractCreation bool, creationAddress, hash, address []byte) *R
235235
toHex(address),
236236
}
237237
}
238-
239-
type Message struct {
240-
To string `json:"to"`
241-
From string `json:"from"`
242-
Input string `json:"input"`
243-
Output string `json:"output"`
244-
Path int32 `json:"path"`
245-
Origin string `json:"origin"`
246-
Timestamp int32 `json:"timestamp"`
247-
Coinbase string `json:"coinbase"`
248-
Block string `json:"block"`
249-
Number int32 `json:"number"`
250-
Value string `json:"value"`
251-
}
252-
253-
func NewMessage(message *state.Message) Message {
254-
return Message{
255-
To: toHex(message.To),
256-
From: toHex(message.From),
257-
Input: toHex(message.Input),
258-
Output: toHex(message.Output),
259-
Path: int32(message.Path),
260-
Origin: toHex(message.Origin),
261-
Timestamp: int32(message.Timestamp),
262-
Coinbase: toHex(message.Origin),
263-
Block: toHex(message.Block),
264-
Number: int32(message.Number.Int64()),
265-
Value: message.Value.String(),
266-
}
267-
}

‎xeth/xeth.go‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,6 @@ func (self *XEth) FromNumber(str string) string {
192192
return ethutil.BigD(fromHex(str)).String()
193193
}
194194

195-
func ToMessages(messages state.Messages) *ethutil.List {
196-
var msgs []Message
197-
for _, m := range messages {
198-
msgs = append(msgs, NewMessage(m))
199-
}
200-
201-
return ethutil.NewList(msgs)
202-
}
203-
204195
func (self *XEth) PushTx(encodedTx string) (string, error) {
205196
tx := types.NewTransactionFromBytes(fromHex(encodedTx))
206197
err := self.eth.TxPool().Add(tx)

0 commit comments

Comments
 (0)