mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +00:00
Do some cleanups (#14608)
* Do some cleanups Found them while looking over the code. * More * Fix
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::keystore::BeefyKeystore;
|
||||
use codec::{Decode, Encode};
|
||||
use codec::{DecodeAll, Encode};
|
||||
use sp_consensus::Error as ConsensusError;
|
||||
use sp_consensus_beefy::{
|
||||
crypto::{AuthorityId, Signature},
|
||||
@@ -43,7 +43,7 @@ pub(crate) fn decode_and_verify_finality_proof<Block: BlockT>(
|
||||
target_number: NumberFor<Block>,
|
||||
validator_set: &ValidatorSet<AuthorityId>,
|
||||
) -> Result<BeefyVersionedFinalityProof<Block>, (ConsensusError, u32)> {
|
||||
let proof = <BeefyVersionedFinalityProof<Block>>::decode(&mut &*encoded)
|
||||
let proof = <BeefyVersionedFinalityProof<Block>>::decode_all(&mut &*encoded)
|
||||
.map_err(|_| (ConsensusError::InvalidJustification, 0))?;
|
||||
verify_with_validator_set::<Block>(target_number, validator_set, &proof).map(|_| proof)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user