Add IBD test cases and check for MsgUnexpectedPruningPoint on receivePruningPointBlock as well (#1459)

* Check for MsgUnexpectedPruningPoint on receivePruningPointBlock as well

* Add IBD test cases

* Revert "Check for MsgUnexpectedPruningPoint on receivePruningPointBlock as well"

This reverts commit 6a6d1ea1807e5e4a4207fd13c78a6f066654606d.

* Change log level for two logs

* Remove "testing a situation where the pruning point moved during IBD (before sending the pruning point block)"
This commit is contained in:
Ori Newman 2021-01-27 16:42:42 +02:00 committed by GitHub
parent 2823461fe2
commit 8d6e71d490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 577 additions and 117 deletions

View File

@ -446,11 +446,11 @@ func (flow *handleRelayInvsFlow) receiveAndInsertPruningPointUTXOSet(
}
case *appmessage.MsgDonePruningPointUTXOSetChunks:
log.Debugf("Finished receiving the UTXO set. Total UTXOs: %d", receivedUTXOCount)
log.Infof("Finished receiving the UTXO set. Total UTXOs: %d", receivedUTXOCount)
return true, nil
case *appmessage.MsgUnexpectedPruningPoint:
log.Debugf("Could not receive the next UTXO chunk because the pruning point %s "+
log.Infof("Could not receive the next UTXO chunk because the pruning point %s "+
"is no longer the pruning point of peer %s", pruningPointHash, flow.peer)
return false, nil

File diff suppressed because it is too large Load Diff