<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 15:02:41 Jun 23, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

web3.eth.subscribe give response blank

vjtwistmobilevjtwistmobile Member Posts: 1
I am using web3 1.0.0 on nodejs all working fine but web3.eth.subscribe not working for pendingTransactions, I don't understand what is the issue.

I'm using
web3 version : 1.0.0
OS : windows
provider : IpcProvider

var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.IpcProvider("\\\\.\\pipe\\geth.ipc", require("net")));

web3.setProvider(new web3.providers.IpcProvider("\\\\.\\pipe\\geth.ipc", require("net")));

var subscription = web3.eth.subscribe('pendingTransactions', function(error, result){
if (!error)
console.log(result);
else
console.log(error);
})
.on("data", function(transaction){
console.log(transaction);
});
Run this code on nodejs and i got the response blank
Sign In or Register to comment.