Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var subscription = web3.eth.subscribe('syncing', function(error, sync){
- if (!error)
- console.log(sync);
- })
- .on("data", function(sync){
- console.log(sync);
- })
- .on("changed", function(isSyncing){
- if(isSyncing) {
- console.log("changed");
- } else {
- console.log("changed to false");
- }
- });
- geth --testnet --rpcapi "eth,web3, personal, accounts, miner, admin" --rpccorsdomain='*' --rpc --rpcaddr="0.0.0.0" --rpcport "8545" --ws --wsorigins="*" --wsaddr 0.0.0.0 --fast
- let web3 = new Web3(new Web3.providers.HttpProvider("ws://geth:8546"));
- "web3": "^1.0.0-beta.30"
Add Comment
Please, Sign In to add comment