Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
nucleo
Commits
c51a2db8
Commit
c51a2db8
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Algunos bugs
parent
b8fd8d9f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/libbfa.js
+10
-12
10 additions, 12 deletions
bin/libbfa.js
with
10 additions
and
12 deletions
bin/libbfa.js
+
10
−
12
View file @
c51a2db8
...
...
@@ -97,25 +97,23 @@ module.exports = class Libbfa
var
w3
=
new
this
.
Web3
(
this
.
provider
);
var
req_url
=
this
.
req_url
;
var
_bfa
=
this
;
// This could just remain the same number all the time.
var
unneededcounter
=
1
;
w3
.
jsonify
=
function
(
opname
,
params
)
{
var
extra
=
params
.
join
(
'
,
'
);
return
JSON
.
parse
(
'
{
'
+
'
"jsonrpc":"2.0",
'
+
'
"id":1,
'
+
'
"method":"
'
+
opname
+
'
",
'
+
'
"params":[
'
+
extra
+
'
]
'
+
'
}
'
);
var
obj
=
{};
obj
.
id
=
unneededcounter
++
;
obj
.
jsonrpc
=
"
2.0
"
;
obj
.
method
=
opname
;
obj
.
params
=
params
;
return
obj
;
};
w3
.
rpcreq
=
function
(
opname
,
params
,
callback
)
{
var
body
=
w3
.
jsonify
(
opname
,
params
);
request
.
post
({
uri
:
req_url
,
json
:
true
,
body
:
body
,
body
:
w3
.
jsonify
(
opname
,
params
)
,
callback
:
function
RPCresponse
(
err
,
obj
)
{
var
r
;
...
...
@@ -154,7 +152,7 @@ module.exports = class Libbfa
// in a TCP stream .
// Writes out data and closes our end of the connection.
// Geth will reply and then close it's end.
s
.
end
(
w3
.
jsonify
(
opname
,
params
)
);
s
ocket
.
end
(
w3
.
jsonify
(
opname
,
params
)
.
valueOf
()
);
});
socket
.
on
(
"
data
"
,
(
d
)
=>
{
try
{
...
...
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