Thursday, April 26, 2018

Working with bitcoin Core Wallet Part 1

Its almost been a one month I am working  on Bitcoin project so I am thinking I share my knowledge how you start . Right now I am working in C# I have  a requirement in which i have to send bulk of bitcoin there are some scenario that I am facing I will share this on day by day whenever i get time .
so start this.

First download a bitcoin Core wallet right now 0.16.0 is released after ,You can find multiple link how to install  YouTube link for Installation.

After installation we need a test wallet so you just right click of exe go the properties and add space and  -testnet




After doing this when you open your screen look like this .PS right now i am using 0.15.0 version



Now we want Test net BTC coins for testing, there are lots of website you can find on this link
Test net BTC.

I will continue the coding part in next part ..




Tuesday, April 17, 2018

Get proper error message when webRequest.GetResponse failed (status code 500)

Right now i am working on bitcoin core wallet application when ever i send request on http request if it is failed it always return
500 status code not a meaning full error message so after googling i found this so i can easily trace
out at what reason it send failed.


after try block  add this

 catch (WebException ex)
            {
                using (var stream = ex.Response.GetResponseStream())
                using (var reader = new StreamReader(stream))
                {
                    var error = reader.ReadToEnd();
                    CustomLogger.Log("Custom Error Desc: " + Convert.ToString(error));

                }
           
            }

ref:

Link for help

Saturday, April 14, 2018

make comma separated and Remove empty lines and spaces in notepad++

Make comma separated:
Find-what box: (\d+)
Replace-with box: \1,
Search mode: ☑ Regular expression

Remove empty lines and spaces:
Use ^\s* for "Find what" and leave "Replace with" blank.