From ed2e1f87aaa632e750fdbbdbe989d17d45160f97 Mon Sep 17 00:00:00 2001 From: Quentin Le Sceller Date: Wed, 5 Dec 2018 13:10:37 -0500 Subject: [PATCH] Fix verify_messages function (#2074) * Fix verify_messages function * Do not use wallet secp to verify messages --- wallet/src/libwallet/api.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wallet/src/libwallet/api.rs b/wallet/src/libwallet/api.rs index 7a5fc659d..72db0f932 100644 --- a/wallet/src/libwallet/api.rs +++ b/wallet/src/libwallet/api.rs @@ -46,7 +46,7 @@ use libwallet::types::{ }; use libwallet::{Error, ErrorKind}; use util; -use util::secp::pedersen; +use util::secp::{self, pedersen}; /// Functions intended for use by the owner (e.g. master seed holder) of the wallet. pub struct APIOwner @@ -730,8 +730,8 @@ where /// Verifies all messages in the slate match their public keys pub fn verify_slate_messages(&mut self, slate: &Slate) -> Result<(), Error> { - let mut w = self.wallet.lock(); - slate.verify_messages(w.keychain().secp())?; + let secp = secp::Secp256k1::with_caps(secp::ContextFlag::VerifyOnly); + slate.verify_messages(&secp)?; Ok(()) }