feat: improve access to genesis utxos (#302)

This commit is contained in:
Santiago Carmuega 2023-10-04 14:40:51 -03:00 committed by GitHub
parent dfaf7942e4
commit dba044f686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 19 deletions

View file

@ -277,10 +277,10 @@ impl From<AddressPayload> for ByronAddress {
#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ByronAddress {
#[n(0)]
payload: TagWrap<ByteVec, 24>,
pub payload: TagWrap<ByteVec, 24>,
#[n(1)]
crc: u32,
pub crc: u32,
}
const CRC: crc::Crc<u32> = crc::Crc::<u32>::new(&crc::CRC_32_ISO_HDLC);
@ -343,11 +343,6 @@ mod tests {
"Ae2tdPwUPEZLs4HtbuNey7tK4hTKrwNwYtGqp7bDfCy2WdR3P6735W5Yfpe",
];
// const ROOT_HASH: &str = "7e9ee4a9527dea9091e2d580edd6716888c42f75d96276290f98fe0b";
//const NON_AVVM_BYRON_ADDRESS_FROM_PREVIEW_GENESIS =
// "FHnt4NL7yPXjpZtYj1YUiX9QYYUZGXDT9gA2PJXQFkTSMx3EgawXK5BUrCHdhe2";
#[test]
fn roundtrip_base58() {
for vector in TEST_VECTORS {
@ -376,16 +371,4 @@ mod tests {
assert_eq!(crc2, addr.crc);
}
}
// #[test]
// fn address_id_matches() {
// let addr = ByronAddress::from_base58(TEST_VECTOR).unwrap();
// let payload = addr.decode().unwrap();
// let computed =
// AddressPayload::hash_address_id(&payload.addrtype, spending_data,
// &payload.attributes);
// assert_eq!(payload.root.to_string(), ROOT_HASH);
// }
}