Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
contrib
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
contrib
Commits
a6a9b4e8
Commit
a6a9b4e8
authored
6 years ago
by
Miguel Montes
Browse files
Options
Downloads
Patches
Plain Diff
Cambio de tipo del argumento de los métodos Balance y BalanceAtBlock
parent
771b74ac
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfa_client/src/bfa/node.go
+3
-3
3 additions, 3 deletions
bfa_client/src/bfa/node.go
bfa_client/src/client/bfa_client.go
+2
-1
2 additions, 1 deletion
bfa_client/src/client/bfa_client.go
with
5 additions
and
4 deletions
bfa_client/src/bfa/node.go
+
3
−
3
View file @
a6a9b4e8
...
@@ -259,13 +259,13 @@ func (node *Node) PeerCount() uint64 {
...
@@ -259,13 +259,13 @@ func (node *Node) PeerCount() uint64 {
return
uint64
(
peerCount
)
return
uint64
(
peerCount
)
}
}
func
(
node
*
Node
)
BalanceAtBlock
(
account
string
,
blockNumber
int64
)
*
big
.
Int
{
func
(
node
*
Node
)
BalanceAtBlock
(
account
common
.
Address
,
blockNumber
int64
)
*
big
.
Int
{
var
balance
BigInt
var
balance
BigInt
node
.
Call
(
&
balance
,
"eth_getBalance"
,
account
,
hexBlockNumber
(
blockNumber
))
node
.
Call
(
&
balance
,
"eth_getBalance"
,
account
,
hexBlockNumber
(
blockNumber
))
return
(
*
big
.
Int
)(
&
balance
)
return
(
*
big
.
Int
)(
&
balance
)
}
}
func
(
node
*
Node
)
Balance
(
account
string
)
*
big
.
Int
{
func
(
node
*
Node
)
Balance
(
account
common
.
Address
)
*
big
.
Int
{
return
node
.
BalanceAtBlock
(
account
,
-
1
)
return
node
.
BalanceAtBlock
(
account
,
-
1
)
}
}
...
@@ -430,7 +430,7 @@ func (node *Node) SealersStatus(blockNumber int64) (status map[string]*SealerSta
...
@@ -430,7 +430,7 @@ func (node *Node) SealersStatus(blockNumber int64) (status map[string]*SealerSta
status
=
make
(
map
[
string
]
*
SealerStatus
)
status
=
make
(
map
[
string
]
*
SealerStatus
)
for
_
,
address
:=
range
node
.
SealersAtBlock
(
blockNumber
)
{
for
_
,
address
:=
range
node
.
SealersAtBlock
(
blockNumber
)
{
status
[
address
]
=
&
SealerStatus
{
status
[
address
]
=
&
SealerStatus
{
Balance
:
node
.
BalanceAtBlock
(
address
,
blockNumber
),
Balance
:
node
.
BalanceAtBlock
(
common
.
HexToAddress
(
address
)
,
blockNumber
),
}
}
}
}
notSeen
:=
int64
(
len
(
status
))
notSeen
:=
int64
(
len
(
status
))
...
...
This diff is collapsed.
Click to expand it.
bfa_client/src/client/bfa_client.go
+
2
−
1
View file @
a6a9b4e8
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"../util"
"../util"
"flag"
"flag"
"fmt"
"fmt"
"github.com/ethereum/go-ethereum/common"
"log"
"log"
"math/big"
"math/big"
"os"
"os"
...
@@ -380,7 +381,7 @@ func status() {
...
@@ -380,7 +381,7 @@ func status() {
util
.
Check
(
err
)
util
.
Check
(
err
)
defer
node
.
Close
()
defer
node
.
Close
()
for
_
,
account
:=
range
node
.
Accounts
()
{
for
_
,
account
:=
range
node
.
Accounts
()
{
nodeStatus
.
Accounts
[
account
]
=
node
.
Balance
(
account
)
nodeStatus
.
Accounts
[
account
]
=
node
.
Balance
(
common
.
HexToAddress
(
account
)
)
}
}
nodeStatus
.
Coinbase
,
_
=
node
.
Coinbase
()
nodeStatus
.
Coinbase
,
_
=
node
.
Coinbase
()
nodeStatus
.
BlockNumber
=
node
.
BlockNumber
()
nodeStatus
.
BlockNumber
=
node
.
BlockNumber
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment