Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

server should exit if bitcoind is pruning #31

Open
ecdsa opened this issue Apr 21, 2013 · 2 comments
Open

server should exit if bitcoind is pruning #31

ecdsa opened this issue Apr 21, 2013 · 2 comments

Comments

@ecdsa
Copy link
Member

ecdsa commented Apr 21, 2013

No description provided.

@EagleTM
Copy link

EagleTM commented Apr 21, 2013

We could check for output of the 2nd ever transaction:
bitcoind getrawtransaction 0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098 1

if it returns error: {"code":-5,"message":"No information available about transaction"} there is pruning happening at bitcoind level.

It currently works fine with a patched bitcoind and txindex=0, but who knows about the future

@EagleTM
Copy link

EagleTM commented Apr 21, 2013

A better tx is f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 in block 170
because it's actually spent

If
bitcoind getrawtransaction f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 0 170
returns raw output there is no pruning active and the patch to bitcoind is applied.
If it returns no information, electrum server should bail out and notify that bitcoind either being run as pruning or the database is corrupted or the patch not applied

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants