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
c1474e18
Commit
c1474e18
authored
Feb 17, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed mined transactions from pending view. Closes #321
parent
26d58e04
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
27 deletions
+12
-27
main.qml
cmd/mist/assets/qml/main.qml
+1
-1
pending_tx.qml
cmd/mist/assets/qml/views/pending_tx.qml
+9
-0
gui.go
cmd/mist/gui.go
+2
-26
No files found.
cmd/mist/assets/qml/main.qml
View file @
c1474e18
...
...
@@ -876,7 +876,7 @@ ApplicationWindow {
}
function
setWalletValue
(
value
)
{
walletValueLabel
.
text
=
value
//
walletValueLabel.text = value
}
function
loadPlugin
(
name
)
{
...
...
cmd/mist/assets/qml/views/pending_tx.qml
View file @
c1474e18
...
...
@@ -41,4 +41,13 @@ Rectangle {
pendingTxModel
.
insert
(
0
,
{
hash
:
tx
.
hash
,
to
:
tx
.
address
,
from
:
tx
.
sender
,
value
:
tx
.
value
,
contract
:
isContract
})
}
function
removeTx
(
tx
)
{
for
(
var
i
=
0
;
i
<
pendingTxModel
.
count
;
i
++
)
{
if
(
tx
.
hash
===
pendingTxModel
.
get
(
i
).
hash
)
{
pendingTxModel
.
remove
(
i
);
break
;
}
}
}
}
cmd/mist/gui.go
View file @
c1474e18
...
...
@@ -407,34 +407,10 @@ func (gui *Gui) update() {
}
switch
ev
:=
ev
.
(
type
)
{
case
core
.
TxPreEvent
:
tx
:=
ev
.
Tx
tstate
:=
gui
.
eth
.
ChainManager
()
.
TransState
()
cstate
:=
gui
.
eth
.
ChainManager
()
.
State
()
taccount
:=
tstate
.
GetAccount
(
gui
.
address
())
caccount
:=
cstate
.
GetAccount
(
gui
.
address
())
unconfirmedFunds
:=
new
(
big
.
Int
)
.
Sub
(
taccount
.
Balance
(),
caccount
.
Balance
())
gui
.
setWalletValue
(
taccount
.
Balance
(),
unconfirmedFunds
)
gui
.
insertTransaction
(
"pre"
,
tx
)
gui
.
insertTransaction
(
"pre"
,
ev
.
Tx
)
case
core
.
TxPostEvent
:
tx
:=
ev
.
Tx
object
:=
state
.
GetAccount
(
gui
.
address
())
if
bytes
.
Compare
(
tx
.
From
(),
gui
.
address
())
==
0
{
object
.
SubAmount
(
tx
.
Value
())
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
}
else
if
bytes
.
Compare
(
tx
.
To
(),
gui
.
address
())
==
0
{
object
.
AddAmount
(
tx
.
Value
())
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
}
gui
.
setWalletValue
(
object
.
Balance
(),
nil
)
state
.
UpdateStateObject
(
object
)
gui
.
getObjectByName
(
"pendingTxView"
)
.
Call
(
"removeTx"
,
xeth
.
NewTx
(
ev
.
Tx
))
}
case
<-
peerUpdateTicker
.
C
:
...
...
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