Skip to content

Commit eae8e68

Browse files
author
Alex Woods
committed
Hopefully more correct delegations
1 parent 7228ea3 commit eae8e68

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

modules/chain_store/src/chain_store.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -967,18 +967,33 @@ impl ChainStore {
967967
});
968968
}
969969
}
970-
MultiEraCert::Conway(cert) => {
971-
if let conway::Certificate::StakeDelegation(cred, pool_key_hash) =
972-
cert.as_ref().as_ref()
973-
{
970+
MultiEraCert::Conway(cert) => match cert.as_ref().as_ref() {
971+
conway::Certificate::StakeDelegation(cred, pool_key_hash) => {
974972
certs.push(TransactionDelegationCertificate {
975973
index: index as u64,
976974
address: map_stake_address(cred, network_id.clone()),
977975
pool_id: to_pool_id(pool_key_hash),
978976
active_epoch: tx.block.extra.epoch + 1,
979977
});
980978
}
981-
}
979+
conway::Certificate::StakeRegDeleg(cred, pool_key_hash, _) => {
980+
certs.push(TransactionDelegationCertificate {
981+
index: index as u64,
982+
address: map_stake_address(cred, network_id.clone()),
983+
pool_id: to_pool_id(pool_key_hash),
984+
active_epoch: tx.block.extra.epoch + 1,
985+
});
986+
}
987+
conway::Certificate::StakeVoteRegDeleg(cred, pool_key_hash, _, _) => {
988+
certs.push(TransactionDelegationCertificate {
989+
index: index as u64,
990+
address: map_stake_address(cred, network_id.clone()),
991+
pool_id: to_pool_id(pool_key_hash),
992+
active_epoch: tx.block.extra.epoch + 1,
993+
});
994+
}
995+
_ => (),
996+
},
982997
_ => (),
983998
}
984999
}

0 commit comments

Comments
 (0)