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
163d506c
Commit
163d506c
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Primeros cambios para cambiar para utilizar ipc en lugar de RPC
parent
372a352e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/libbfa.js
+4
-2
4 additions, 2 deletions
bin/libbfa.js
bin/libbfa.sh
+1
-1
1 addition, 1 deletion
bin/libbfa.sh
network/config.toml
+2
-2
2 additions, 2 deletions
network/config.toml
test2network/config.toml
+2
-2
2 additions, 2 deletions
test2network/config.toml
with
9 additions
and
7 deletions
bin/libbfa.js
+
4
−
2
View file @
163d506c
...
...
@@ -9,6 +9,7 @@ module.exports = class Libbfa
constructor
()
{
this
.
fs
=
require
(
'
fs
'
);
this
.
Web3
=
require
(
'
web3
'
);
var
net
=
require
(
'
net
'
);
//
// BFAHOME
if
(
undefined
==
process
.
env
.
BFAHOME
)
...
...
@@ -47,6 +48,8 @@ module.exports = class Libbfa
//
this
.
netport
=
Number
.
parseInt
(
this
.
setfromfile
(
this
.
nodedir
+
'
/netport
'
,
30303
));
this
.
rpcport
=
Number
.
parseInt
(
this
.
setfromfile
(
this
.
nodedir
+
'
/rpcport
'
,
8545
));
//this.provider = 'http://127.0.0.1:' + this.rpcport; // old
this
.
provider
=
new
this
.
Web3
.
providers
.
IpcProvider
(
this
.
nodedir
+
'
/geth.ipc
'
,
net
)
this
.
account
=
process
.
env
.
BFAACCOUNT
;
}
...
...
@@ -78,8 +81,7 @@ module.exports = class Libbfa
newweb3
()
{
var
provider
=
'
http://127.0.0.1:
'
+
this
.
rpcport
;
var
w3
=
new
this
.
Web3
(
provider
);
var
w3
=
new
this
.
Web3
(
this
.
provider
);
w3
.
rpcreq
=
function
(
opname
,
params
,
callback
)
{
var
extra
=
params
.
join
(
'
,
'
);
...
...
This diff is collapsed.
Click to expand it.
bin/libbfa.sh
+
1
−
1
View file @
163d506c
...
...
@@ -194,7 +194,7 @@ test -n "$BFANODEDIR" || BFANODEDIR="${BFANETWORKDIR}/node"
if
[
!
-d
"
${
BFANODEDIR
}
"
-o
!
-d
"
${
BFANODEDIR
}
/geth/chaindata"
]
then
echo
"Node is not initialised. Initialising with genesis."
geth
--cache
0
--datadir
"
${
BFANODEDIR
}
"
init
"
${
BFANETWORKDIR
}
/genesis.json"
geth
--cache
0
--datadir
"
${
BFANODEDIR
}
"
--networkid
${
BFANETWORKID
}
init
"
${
BFANETWORKDIR
}
/genesis.json"
fi
#
# netport
...
...
This diff is collapsed.
Click to expand it.
network/config.toml
+
2
−
2
View file @
163d506c
...
...
@@ -60,10 +60,10 @@ omitempty = ""
IPCPath
=
"geth.ipc"
HTTPPort
=
8545
HTTPVirtualHosts
=
[
"localhost"
]
HTTPModules
=
[
"net"
,
"web3"
,
"eth"
,
"
shh"
,
"clique"
,
"admin"
,
"miner"
,
"personal
"
]
HTTPModules
=
[
"net"
,
"web3"
,
"eth"
,
"
clique
"
]
WSHost
=
"127.0.0.1"
WSPort
=
8546
WSModules
=
[
"net"
,
"web3"
,
"eth"
,
"
shh"
,
"clique"
,
"admin"
,
"miner"
,
"personal
"
]
WSModules
=
[
"net"
,
"web3"
,
"eth"
,
"
clique
"
]
GraphQLPort
=
8547
GraphQLVirtualHosts
=
[
"localhost"
]
...
...
This diff is collapsed.
Click to expand it.
test2network/config.toml
+
2
−
2
View file @
163d506c
...
...
@@ -60,10 +60,10 @@ omitempty = ""
IPCPath
=
"geth.ipc"
HTTPPort
=
8545
HTTPVirtualHosts
=
[
"localhost"
]
HTTPModules
=
[
"net"
,
"web3"
,
"eth"
,
"
shh"
,
"clique"
,
"admin"
,
"miner"
,
"personal
"
]
HTTPModules
=
[
"net"
,
"web3"
,
"eth"
,
"
clique
"
]
WSHost
=
"127.0.0.1"
WSPort
=
8546
WSModules
=
[
"net"
,
"web3"
,
"eth"
,
"
shh"
,
"clique"
,
"admin"
,
"miner"
,
"personal
"
]
WSModules
=
[
"net"
,
"web3"
,
"eth"
,
"
clique
"
]
GraphQLPort
=
8547
GraphQLVirtualHosts
=
[
"localhost"
]
...
...
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