diff --git a/src/psbt.h b/src/psbt.h index b636f0348b7..fc9ac71eee9 100644 --- a/src/psbt.h +++ b/src/psbt.h @@ -178,7 +178,7 @@ void SerializeHDKeypath(Stream& s, KeyOriginInfo hd_keypath) template void SerializeHDKeypaths(Stream& s, const std::map& hd_keypaths, CompactSizeWriter type) { - for (auto keypath_pair : hd_keypaths) { + for (const auto& keypath_pair : hd_keypaths) { if (!keypath_pair.first.IsValid()) { throw std::ios_base::failure("Invalid CPubKey being serialized"); }