File tree 1 file changed +19
-1
lines changed
components/chainhook-sdk/src/hord/db
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1159,7 +1159,25 @@ pub fn retrieve_satoshi_point_using_lazy_storage(
1159
1159
}
1160
1160
1161
1161
let height = Height ( ordinal_block_number. into ( ) ) ;
1162
- let ordinal_number = height. starting_sat ( ) . 0 + ordinal_offset;
1162
+ let mut ordinal_number = height. starting_sat ( ) . 0 + ordinal_offset;
1163
+
1164
+ if input_index > 0 {
1165
+ let tx =
1166
+ match find_lazy_block_at_block_height ( block_identifier. index as u32 , 10 , & blocks_db) {
1167
+ Some ( block) => match block. find_and_serialize_transaction_with_txid (
1168
+ & transaction_identifier. get_8_hash_bytes ( ) ,
1169
+ ) {
1170
+ Some ( entry) => entry,
1171
+ None => unreachable ! ( ) ,
1172
+ } ,
1173
+ None => {
1174
+ unimplemented ! ( )
1175
+ }
1176
+ } ;
1177
+ for i in 0 ..input_index {
1178
+ ordinal_number += tx. inputs [ i] . txin_value ;
1179
+ }
1180
+ }
1163
1181
1164
1182
Ok ( TraversalResult {
1165
1183
inscription_number,
You can’t perform that action at this time.
0 commit comments