bitcoinlib icon indicating copy to clipboard operation
bitcoinlib copied to clipboard

GetRawMemPool(true) throws exception

Open Leonardiae opened this issue 6 years ago • 4 comments
trafficstars

When calling GetRawMemPool(true) it throws this exception: {"Unkown property: fees in GetRawMemPool()"}

Leonardiae avatar Nov 04 '19 09:11 Leonardiae

Which Bitcoin Core version you're using? Also, can you send us the stack trace of the exception?

moodmosaic avatar Nov 04 '19 10:11 moodmosaic

I'm using 0.18.0

I'm a starter dev and don't know how to make a stack trace :( But this is my function:

static public void GetRawMempoolLocalNode() { try {

            IBitcoinService BitcoinService = new BitcoinService("localhost", "x", "x", "x", 2);
            var response = BitcoinService.GetRawMemPool(true);
        }
        catch (Exception exception)
        {
                    //
        }
    }

If I call GetRawMemPool without a parameter then I get results (a list of txid's).

Leonardiae avatar Nov 04 '19 10:11 Leonardiae

I'm a starter dev and don't know how to make a stack trace :(

That's totally fine, we're more than happy to help :+1: — So, in your catch block, trying doing something like var err = exception.ToString(); and then hover your debugger there and copy the text.

Or do a System.Console.WriteLine(exception.ToString()); and let us know what the output is.


That is,

catch (Exception exception)
{
    var err = exception.ToString();
    // What is the value of `err`?
}

or

catch (Exception exception)
{
    System.Console.WriteLine(exception.ToString());
    // What gets printed in the console?
}

moodmosaic avatar Nov 04 '19 15:11 moodmosaic

System.Exception: Unkown property: fees in GetRawMemPool() at BitcoinLib.Services.CoinService.GetRawMemPool(Boolean verbose) at Prog.Program.GetRawMempoolLocalNode() in C:\Users\Leonardiae\source\repos\Prog .netframework\Prog .netframework\Program.cs:line 71

Leonardiae avatar Nov 04 '19 19:11 Leonardiae