Skip to content

Commit 724e98a

Browse files
authored
change asset_desc to asset_desc_hash (#155)
This is a redo of #150 and #153 chery picked 3f9dda7 and resolved conflicts
2 parents 190a50c + fb85c9b commit 724e98a

File tree

8 files changed

+314
-363
lines changed

8 files changed

+314
-363
lines changed

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.65.0"
2+
channel = "1.71.0"
33
components = [ "clippy", "rustfmt" ]

src/bundle/burn_validation.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ impl fmt::Display for BurnError {
6464

6565
#[cfg(test)]
6666
mod tests {
67+
use crate::issuance::compute_asset_desc_hash;
6768
use crate::value::NoteValue;
6869

6970
use super::*;
@@ -88,7 +89,10 @@ mod tests {
8889
let isk = IssuanceAuthorizingKey::from_bytes([1u8; 32]).unwrap();
8990

9091
(
91-
AssetBase::derive(&IssuanceValidatingKey::from(&isk), asset_desc),
92+
AssetBase::derive(
93+
&IssuanceValidatingKey::from(&isk),
94+
&compute_asset_desc_hash(asset_desc).unwrap(),
95+
),
9296
NoteValue::from_raw(value),
9397
)
9498
}

src/bundle/commitments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub(crate) fn hash_issue_bundle_txid_data<A: IssueAuth>(bundle: &IssueBundle<A>)
105105
ind.update(note.rseed().as_bytes());
106106
}
107107
ia.update(ind.finalize().as_bytes());
108-
ia.update(action.asset_desc());
108+
ia.update(action.asset_desc_hash());
109109
ia.update(&[u8::from(action.is_finalized())]);
110110
}
111111
h.update(ia.finalize().as_bytes());

0 commit comments

Comments
 (0)