use the static secp instance everywhere (except the wallet) (#250)

This commit is contained in:
AntiochP
2017-11-09 14:26:45 -05:00
committed by GitHub
parent a0c0d6f382
commit c1656f7660
10 changed files with 102 additions and 78 deletions
+1 -3
View File
@@ -16,7 +16,6 @@
use std::sync::{Arc, RwLock};
use util::secp;
use time;
use core::consensus;
@@ -209,8 +208,7 @@ fn validate_block(
}
// main isolated block validation, checks all commitment sums and sigs
let curve = secp::Secp256k1::with_caps(secp::ContextFlag::Commit);
try!(b.validate(&curve).map_err(&Error::InvalidBlockProof));
try!(b.validate().map_err(&Error::InvalidBlockProof));
// apply the new block to the MMR trees and check the new root hashes
if b.header.previous == ctx.head.last_block_h {