mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Fix verify_messages function (#2074)
* Fix verify_messages function * Do not use wallet secp to verify messages
This commit is contained in:
parent
a717dbad96
commit
ed2e1f87aa
1 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ use libwallet::types::{
|
||||||
};
|
};
|
||||||
use libwallet::{Error, ErrorKind};
|
use libwallet::{Error, ErrorKind};
|
||||||
use util;
|
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.
|
/// Functions intended for use by the owner (e.g. master seed holder) of the wallet.
|
||||||
pub struct APIOwner<W: ?Sized, C, K>
|
pub struct APIOwner<W: ?Sized, C, K>
|
||||||
|
@ -730,8 +730,8 @@ where
|
||||||
|
|
||||||
/// Verifies all messages in the slate match their public keys
|
/// Verifies all messages in the slate match their public keys
|
||||||
pub fn verify_slate_messages(&mut self, slate: &Slate) -> Result<(), Error> {
|
pub fn verify_slate_messages(&mut self, slate: &Slate) -> Result<(), Error> {
|
||||||
let mut w = self.wallet.lock();
|
let secp = secp::Secp256k1::with_caps(secp::ContextFlag::VerifyOnly);
|
||||||
slate.verify_messages(w.keychain().secp())?;
|
slate.verify_messages(&secp)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue