start trying to connect to segnet

doesn't work or anything yet
This commit is contained in:
Tadge Dryja committed 2016-02-10 13:22:15 -08:00
1 parent 2cbe605221
commit 7fdcf9bfbc
3 files changed
+11 -8

No files matched your search

+5 -2
View File
@@ -15,7 +15,8 @@ const (
headerFileName = "headers.bin"
// version hardcoded for now, probably ok...?
VERSION = 70011
// 70012 is for segnet... make this a init var?
VERSION = 70012
)
type SPVCon struct {
@@ -115,7 +116,9 @@ func (s *SPVCon) IngestMerkleBlock(m *wire.MsgMerkleBlock) {
// into our SPV header file
newMerkBlockSha := m.Header.BlockSha()
if !hah.blockhash.IsEqual(&newMerkBlockSha) {
log.Printf("merkle block out of order error")
log.Printf("merkle block out of order got %s expect %s",
m.Header.BlockSha().String(), hah.blockhash.String())
log.Printf("has %d hashes", len(m.Hashes))
return
}
+1 -1
View File
@@ -128,7 +128,7 @@ func (s *SPVCon) TxHandler(m *wire.MsgTx) {
height, ok := s.TS.OKTxids[m.TxSha()]
s.TS.OKMutex.Unlock()
if !ok {
log.Printf("Tx %s unknown, will not ingest\n")
log.Printf("Tx %s unknown, will not ingest\n", m.TxSha().String())
return
}