mirror of https://github.com/BTCPrivate/lnd.git
fix nil witness crash; sync's now on segnet
This commit is contained in:
parent
ee4dd8aaa0
commit
a955a428a7
8
shell.go
8
shell.go
|
@ -69,10 +69,10 @@ func shell() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// once we're connected, initiate headers sync
|
// once we're connected, initiate headers sync
|
||||||
// err = SCon.AskForHeaders()
|
err = SCon.AskForHeaders()
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// log.Fatal(err)
|
log.Fatal(err)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// main shell loop
|
// main shell loop
|
||||||
for {
|
for {
|
||||||
|
|
|
@ -349,7 +349,7 @@ func (s *SPVCon) AskForBlocks() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("will request merkleblocks %d to %d\n", dbTip, headerTip)
|
fmt.Printf("will request blocks %d to %d\n", dbTip, headerTip)
|
||||||
|
|
||||||
if !s.HardMode { // don't send this in hardmode! that's the whole point
|
if !s.HardMode { // don't send this in hardmode! that's the whole point
|
||||||
// create initial filter
|
// create initial filter
|
||||||
|
|
|
@ -133,8 +133,9 @@ func CheckDoubleSpends(
|
||||||
|
|
||||||
// TxToString prints out some info about a transaction. for testing / debugging
|
// TxToString prints out some info about a transaction. for testing / debugging
|
||||||
func TxToString(tx *wire.MsgTx) string {
|
func TxToString(tx *wire.MsgTx) string {
|
||||||
str := fmt.Sprintf("\t size %d wsize %d Tx %s\n",
|
str := fmt.Sprintf("\t size %d vsize %d wsize %d Tx %s\n",
|
||||||
tx.SerializeSize(), tx.SerializeSizeWitness(), tx.TxSha().String())
|
tx.SerializeSize(), tx.VirtualSize(), tx.SerializeSizeWitness(),
|
||||||
|
tx.TxSha().String())
|
||||||
for i, in := range tx.TxIn {
|
for i, in := range tx.TxIn {
|
||||||
str += fmt.Sprintf("Input %d: %s\n", i, in.PreviousOutPoint.String())
|
str += fmt.Sprintf("Input %d: %s\n", i, in.PreviousOutPoint.String())
|
||||||
str += fmt.Sprintf("SigScript for input %d: %x\n", i, in.SignatureScript)
|
str += fmt.Sprintf("SigScript for input %d: %x\n", i, in.SignatureScript)
|
||||||
|
@ -148,7 +149,7 @@ func TxToString(tx *wire.MsgTx) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, wit := range tx.TxWitness {
|
for i, wit := range tx.TxWitness {
|
||||||
if wit.ScriptWitness != nil {
|
if wit != nil {
|
||||||
str += fmt.Sprintf("Witness %d: %x\n", i, wit.ScriptWitness)
|
str += fmt.Sprintf("Witness %d: %x\n", i, wit.ScriptWitness)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue