Cryptographically invalidate a PubKey whilst keeping length and first byte
| 466 | |
| 467 | // Cryptographically invalidate a PubKey whilst keeping length and first byte |
| 468 | static void PollutePubKey(CPubKey& pubkey) |
| 469 | { |
| 470 | std::vector<unsigned char> pubkey_raw(pubkey.begin(), pubkey.end()); |
| 471 | std::fill(pubkey_raw.begin()+1, pubkey_raw.end(), 0); |
| 472 | pubkey = CPubKey(pubkey_raw); |
| 473 | assert(!pubkey.IsFullyValid()); |
| 474 | assert(pubkey.IsValid()); |
| 475 | } |
| 476 | |
| 477 | // Test watch-only logic for PubKeys |
| 478 | BOOST_AUTO_TEST_CASE(WatchOnlyPubKeys) |
no test coverage detected