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
|
||||
// err = SCon.AskForHeaders()
|
||||
// if err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
err = SCon.AskForHeaders()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// main shell loop
|
||||
for {
|
||||
|
@ -349,7 +349,7 @@ func (s *SPVCon) AskForBlocks() error {
|
||||
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
|
||||
// create initial filter
|
||||
|
@ -133,8 +133,9 @@ func CheckDoubleSpends(
|
||||
|
||||
// TxToString prints out some info about a transaction. for testing / debugging
|
||||
func TxToString(tx *wire.MsgTx) string {
|
||||
str := fmt.Sprintf("\t size %d wsize %d Tx %s\n",
|
||||
tx.SerializeSize(), tx.SerializeSizeWitness(), tx.TxSha().String())
|
||||
str := fmt.Sprintf("\t size %d vsize %d wsize %d Tx %s\n",
|
||||
tx.SerializeSize(), tx.VirtualSize(), tx.SerializeSizeWitness(),
|
||||
tx.TxSha().String())
|
||||
for i, in := range tx.TxIn {
|
||||
str += fmt.Sprintf("Input %d: %s\n", i, in.PreviousOutPoint.String())
|
||||
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 {
|
||||
if wit.ScriptWitness != nil {
|
||||
if wit != nil {
|
||||
str += fmt.Sprintf("Witness %d: %x\n", i, wit.ScriptWitness)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user