|
@ -65,7 +65,7 @@ class SweepStore(SqlDB): |
|
|
|
|
|
|
|
|
@sql |
|
|
@sql |
|
|
def get_sweep_tx(self, funding_outpoint, prev_txid): |
|
|
def get_sweep_tx(self, funding_outpoint, prev_txid): |
|
|
return [Transaction(r.tx) for r in self.DBSession.query(SweepTx).filter(SweepTx.funding_outpoint==funding_outpoint, SweepTx.prev_txid==prev_txid).all()] |
|
|
return [Transaction(bh2u(r.tx)) for r in self.DBSession.query(SweepTx).filter(SweepTx.funding_outpoint==funding_outpoint, SweepTx.prev_txid==prev_txid).all()] |
|
|
|
|
|
|
|
|
@sql |
|
|
@sql |
|
|
def list_sweep_tx(self): |
|
|
def list_sweep_tx(self): |
|
@ -73,7 +73,7 @@ class SweepStore(SqlDB): |
|
|
|
|
|
|
|
|
@sql |
|
|
@sql |
|
|
def add_sweep_tx(self, funding_outpoint, prev_txid, tx): |
|
|
def add_sweep_tx(self, funding_outpoint, prev_txid, tx): |
|
|
self.DBSession.add(SweepTx(funding_outpoint=funding_outpoint, prev_txid=prev_txid, tx=str(tx), txid=tx.txid())) |
|
|
self.DBSession.add(SweepTx(funding_outpoint=funding_outpoint, prev_txid=prev_txid, tx=bfh(str(tx)), txid=tx.txid())) |
|
|
self.DBSession.commit() |
|
|
self.DBSession.commit() |
|
|
|
|
|
|
|
|
@sql |
|
|
@sql |
|
|