<div dir="ltr"><div dir="ltr">Hi 

Zmn,</div><div dir="ltr"><br><div>Good morning.</div><div><br></div><div>Yes, completely agree with you, I would like to contribute to LN, I'm running lightning in integration with this repo(<a href="https://github.com/sg777/chips3">https://github.com/sg777/chips3</a>) which is a bitcoin fork. Can I add changes to LN that support CHIPS, so that I can push the commands upstream which I implemented?</div><div> <br clear="all"><div><div dir="ltr" class="gmail_signature">Regards,<br>Sarat G<br><div><br></div><div><br></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 13, 2018 at 6:43 PM ZmnSCPxj <<a href="mailto:ZmnSCPxj@protonmail.com">ZmnSCPxj@protonmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Good morning Sarat,<br></div><div><br></div><div>Adding commands to lightningd directly without contributing them to lightningd development is risky for you.<br></div><div>You will have to maintain your own fork forever, and if we rework command system again, you will have to adapt your new commands.<br></div><div><br></div><div><br></div><div>Regards,<br></div><div>Zmn<br></div><div><br></div><div class="gmail-m_-6041762089341033568protonmail_signature_block"><div class="gmail-m_-6041762089341033568protonmail_signature_block-user gmail-m_-6041762089341033568protonmail_signature_block-empty"><br></div><div class="gmail-m_-6041762089341033568protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Thursday, December 13, 2018 11:17 AM, Sarat G <<a href="mailto:sarath.ginjupalli89@gmail.com" target="_blank">sarath.ginjupalli89@gmail.com</a>> wrote:<br></div><div> <br></div><blockquote type="cite" class="gmail-m_-6041762089341033568protonmail_quote"><div dir="ltr"><div>Hi 

ZmnSCPxj,<br></div><div><br></div><div>Sorry for the late reply, I overlooked the mail. I'm implementing few of the commands mentioned below:<br></div><div><br></div><div>1. invoice-count:  Returns the count of the invoices<br></div><div>2. delete-all-invoices: Deletes all the existing invoices<br></div><div>3. peer-channel-state: Returns the state of the channel for the given peer_id.<br></div><div><br></div><div>As mentioned by Christian, for the commands to which I don;t need to pass arguments I was able to implement them successfully. But for implementing the command 'peer-channel-state' I need to pass peer_id as parameter. when I passed so the it's crashing in the lightningd. <br></div><div><br></div><div>Below is the crash log, while passing parameters do we need to handle them at the lightningd?<br></div><div><br></div><div><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">root<span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>@sg777</i></b></span></span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">1</span> <span style="color:rgb(128,128,48)">~</span><span style="color:rgb(128,128,48)">/</span>lightning<span style="color:rgb(128,128,48)">/</span>cli <span style="color:rgb(128,128,48)">#</span> <span style="color:rgb(128,128,48)">.</span><span style="color:rgb(128,128,48)">/</span>lightning<span style="color:rgb(128,128,48)">-</span>cli peer<span style="color:rgb(128,128,48)">-</span>channel<span style="color:rgb(128,128,48)">-</span>state <span style="color:rgb(128,0,0)">"</span><span style="color:rgb(0,0,230)">03943d572eb97ac78055cf4c708660228a60b2956fdcfeaaceba5551f98e92e727</span><span style="color:rgb(128,0,0)">"</span>
<span style="color:rgb(227,74,220)">lightningd:</span> lightningd<span style="color:rgb(128,128,48)">/</span>jsonrpc<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">480</span><span style="color:rgb(128,0,128)">:</span> parse_request<span style="color:rgb(128,0,128)">:</span> Assertion `c<span style="color:rgb(128,128,48)">-</span><span style="color:rgb(128,128,48)">></span>pending' failed<span style="color:rgb(128,128,48)">.</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>086Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> FATAL SIGNAL <span style="color:rgb(0,140,0)">6</span> RECEIVED
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> lightningd<span style="color:rgb(128,128,48)">/</span>log<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">494</span> <span style="color:rgb(128,128,48)">(</span>log_crash<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79691c993</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x7ffae5b3cf1f</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x7ffae5b3ce97</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x7ffae5b3e800</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x7ffae5b2e399</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x7ffae5b2e411</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> lightningd<span style="color:rgb(128,128,48)">/</span>jsonrpc<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">480</span> <span style="color:rgb(128,128,48)">(</span>parse_request<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a796918cba</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> lightningd<span style="color:rgb(128,128,48)">/</span>jsonrpc<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">645</span> <span style="color:rgb(128,128,48)">(</span>read_json<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79691954a</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">59</span> <span style="color:rgb(128,128,48)">(</span>next_plan<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79696c300</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">387</span> <span style="color:rgb(128,128,48)">(</span>do_plan<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79696cdfd</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">397</span> <span style="color:rgb(128,128,48)">(</span>io_ready<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79696ce3b</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>poll<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">310</span> <span style="color:rgb(128,128,48)">(</span>io_loop<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79696e803</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> lightningd<span style="color:rgb(128,128,48)">/</span>lightningd<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">407</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(64,0,0)">main</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a79691b0a1</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x7ffae5b1fb96</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0x55a796909939</span>
<span style="color:rgb(0,140,0)">2018</span><span style="color:rgb(128,128,48)">-</span><span style="color:rgb(0,140,0)">12</span><span style="color:rgb(128,128,48)">-</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>13T03</i></b></span></span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">07</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,128,0)">34.</span><span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>103Z</i></b></span></span> lightningd<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,140,0)">14958</span><span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span> backtrace<span style="color:rgb(128,0,128)">:</span> <span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span> <span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">(</span>null<span style="color:rgb(128,128,48)">)</span><span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(0,128,0)">0xffffffffffffffff</span>
Fatal <span style="color:rgb(96,48,0)">signal</span> <span style="color:rgb(0,140,0)">6</span><span style="color:rgb(128,128,48)">.</span> <span style="color:rgb(0,128,0)">0x55a79691ca91</span> log_crash
        lightningd<span style="color:rgb(128,128,48)">/</span>log<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">520</span>
<span style="color:rgb(0,128,0)">0x7ffae5b3cf1f</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0x7ffae5b3ce97</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0x7ffae5b3e800</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0x7ffae5b2e399</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0x7ffae5b2e411</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0x55a796918cba</span> parse_request
        lightningd<span style="color:rgb(128,128,48)">/</span>jsonrpc<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">480</span>
<span style="color:rgb(0,128,0)">0x55a79691954a</span> read_json
        lightningd<span style="color:rgb(128,128,48)">/</span>jsonrpc<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">645</span>
<span style="color:rgb(0,128,0)">0x55a79696c300</span> next_plan
        ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">59</span>
<span style="color:rgb(0,128,0)">0x55a79696cdfd</span> do_plan
        ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">387</span>
<span style="color:rgb(0,128,0)">0x55a79696ce3b</span> io_ready
        ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">397</span>
<span style="color:rgb(0,128,0)">0x55a79696e803</span> io_loop
        ccan<span style="color:rgb(128,128,48)">/</span>ccan<span style="color:rgb(128,128,48)">/</span>io<span style="color:rgb(128,128,48)">/</span>poll<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">310</span>
<span style="color:rgb(0,128,0)">0x55a79691b0a1</span> <span style="color:rgb(64,0,0)">main</span>
        lightningd<span style="color:rgb(128,128,48)">/</span>lightningd<span style="color:rgb(128,128,48)">.</span>c<span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">407</span>
<span style="color:rgb(0,128,0)">0x7ffae5b1fb96</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0x55a796909939</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
<span style="color:rgb(0,128,0)">0xffffffffffffffff</span> <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span>
        <span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">?</span><span style="color:rgb(128,0,128)">:</span><span style="color:rgb(0,140,0)">0</span>
Log dumped in crash<span style="color:rgb(128,128,48)">.</span>log
lightning<span style="color:rgb(128,128,48)">-</span>cli<span style="color:rgb(128,0,128)">:</span> Non<span style="color:rgb(128,128,48)">-</span>object response <span style="background-color:rgb(221,0,0)"><span style="color:rgb(255,255,255)"><b><i>''</i></b></span></span>
<span style="color:rgb(128,128,48)">[</span><span style="color:rgb(0,140,0)">1</span><span style="color:rgb(128,128,48)">]</span><span style="color:rgb(128,128,48)">+</span>  Aborted                 <span style="color:rgb(128,128,48)">(</span>core dumped<span style="color:rgb(128,128,48)">)</span> <span style="color:rgb(128,128,48)">.</span><span style="color:rgb(128,128,48)">.</span><span style="color:rgb(128,128,48)">/</span>lightningd<span style="color:rgb(128,128,48)">/</span>lightningd
<br></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><br></pre><div><div>Thank You.<br></div><div><br></div><div dir="ltr"><div>Regards,<br></div><div>Sarat G<br></div><div><br></div><div><br></div></div></div><div><br></div></div></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Fri, Dec 7, 2018 at 12:50 PM ZmnSCPxj <<a href="mailto:ZmnSCPxj@protonmail.com" target="_blank">ZmnSCPxj@protonmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Good morning Sarat,<br></div><div><br></div><div>What are you querying on the database?<br></div><div>If you find it useful, it might be that others find it useful, so it is best if you feed it back to us upstream what extra command you made.<br></div><div>It might also be possible, as cdecker said, that, extra command can be built from existing commands, and so it is better to put in some plugin instead.<br></div><div><br></div><div>Regards,<br></div><div>ZmnSCPxj<br></div><div><br></div><div class="gmail-m_-6041762089341033568gmail-m_-5612997738829606075protonmail_signature_block"><div class="gmail-m_-6041762089341033568gmail-m_-5612997738829606075protonmail_signature_block-user gmail-m_-6041762089341033568gmail-m_-5612997738829606075protonmail_signature_block-empty"><br></div><div class="gmail-m_-6041762089341033568gmail-m_-5612997738829606075protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div>On Friday, December 7, 2018 2:30 PM, Sarat G <<a href="mailto:sarath.ginjupalli89@gmail.com" target="_blank">sarath.ginjupalli89@gmail.com</a>> wrote:<br></div><div><br></div><blockquote type="cite" class="gmail-m_-6041762089341033568gmail-m_-5612997738829606075protonmail_quote"><div dir="ltr"><div dir="ltr"><div>Hi Christian,<br></div><div><br></div><div>Thank you very much for the help, now I'm able to add the commands successfully by registering it with AUTODATA. Since I'm running the customised queries on the database now I'm registering my methods with AUTODATA and doing.<br></div><div><br></div><div>Prior to this, I'm opening the `lightningd.sqlite3` file from the program. But the problem which I encountered is if I make an RPC call the DB gets locked and that sometimes preventing me to access the DB directly from the same process.<br></div><div><br></div><div>Anyways I written few queries and registered them with AUTODATA and there are working fine. <br></div><div><br></div><div>Thank you once again.<br></div><div><div><br></div><div><div dir="ltr"><div>Regards,<br></div><div>Sarat G<br></div><div><br></div><div><br></div></div></div><div><br></div></div></div></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 7:50 PM Christian Decker <<a href="mailto:decker.christian@gmail.com" target="_blank">decker.christian@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi Sarat,<br></div><div><br></div><div>`AUTODATA` will take care of registering the json command with the<br></div><div>JSON-RPC framework and you should be able to see your command with<br></div><div>`lightning-cli help` after recompiling and restarting. The `struct<br></div><div>json_command` that you registered with `AUTODATA` contains the method<br></div><div>name and the function to be called when a request matching that method<br></div><div>name comes in. The compiler should be able to help you with the<br></div><div>signature of the function that we expect.<br></div><div><br></div><div>Notice that if the information you require is exposed in some other way,<br></div><div>you can also write a plugin, instead. Plugins can be written in whatever<br></div><div>language you want, and can register options and JSON-RPC methods as well<br></div><div>(more to come in future). So if you don't need information that is not<br></div><div>otherwise exposed that might be a good option (you'd need to run the<br></div><div>unreleased `master` version though).<br></div><div><br></div><div>Cheers,<br></div><div>Christian<br></div><div><br></div><div>Sarat G <<a href="mailto:sarath.ginjupalli89@gmail.com" target="_blank">sarath.ginjupalli89@gmail.com</a>> writes:<br></div><div>> Hi,<br></div><div>><br></div><div>> As part of my project requirement, i got to need the command that returns<br></div><div>> the status of the channel by taking input as peer id. For that I written up<br></div><div>> the necessary logic and lined it using AUTODATA. My doubt is on the<br></div><div>> lightningd side at which part do I need to add the logic to process the<br></div><div>> command information sent by the lightning-cli.<br></div><div>><br></div><div>> Can someone please provide me some insights into adding a single command to<br></div><div>> the lightning-cli repo.<br></div><div>><br></div><div>> Thanks in advance.<br></div><div>><br></div><div>> Regards,<br></div><div>> Sarat G<br></div><div>> -- <br></div><div>> c-lightning mailing list<br></div><div>> <a href="mailto:c-lightning@lists.ozlabs.org" target="_blank">c-lightning@lists.ozlabs.org</a><br></div><div>> <a href="https://lists.ozlabs.org/listinfo/c-lightning" rel="noreferrer" target="_blank">https://lists.ozlabs.org/listinfo/c-lightning</a><br></div></blockquote></div></blockquote><div><br></div></blockquote></div></blockquote><div><br></div></blockquote></div>