Merge branch 'feature/vouchers' of https://github.com/nymtech/nym into feature/vouchers

This commit is contained in:
aniampio
2021-11-03 20:44:23 +00:00
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ async fn _prepare_temporary_credential(validators: &[Url], raw_identity: &[u8])
serial_number: params.random_scalar(),
binding_number: params.random_scalar(),
voucher_value: hash_to_scalar(BANDWIDTH_VALUE.to_be_bytes()),
voucher_info: hash_to_scalar(String::from("BandwidthVoucher").as_bytes()),
voucher_info: hash_to_scalar("BandwidthVoucher"),
};
let bandwidth_credential = credentials::bandwidth::obtain_signature(
+1 -4
View File
@@ -38,10 +38,7 @@ pub struct BandwidthVoucherAttributes {
impl BandwidthVoucherAttributes {
pub fn get_public_attributes(&self) -> Vec<PublicAttribute> {
let mut pub_attributes = Vec::with_capacity(PUBLIC_ATTRIBUTES as usize);
pub_attributes.push(self.voucher_value);
pub_attributes.push(self.voucher_info);
pub_attributes
vec![self.voucher_value, self.voucher_info]
}
pub fn get_private_attributes(&self) -> Vec<PrivateAttribute> {