You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /transfers endpoint returns a list of inscription IDs moved in a given block, very useful. But also returns addresses where inscription moved to. Also very useful. But that address wrong when inscription has moved again later, because
async fn inscriptionids_from_height_inner(
chain: Chain,
index: Arc<Index>,
inscription_ids: Vec<InscriptionId>,
) -> ServerResult<String> {
task::block_in_place(|| {
let mut ret = String::from("");
let mut tx_cache = HashMap::new();
for inscription_id in inscription_ids {
let satpoint = index
.get_inscription_satpoint_by_id(inscription_id)?
.ok_or_not_found(|| format!("inscription {inscription_id}"))?;
let address = Self::outpoint_to_address(chain, &index, satpoint.outpoint, &mut tx_cache)?;
ret += &format!("{} {}\n", inscription_id, address);
}
Ok(ret)
})
always look at current satpoint of inscription id. So I think is misleading to return address.
The text was updated successfully, but these errors were encountered:
This is especially tricky because it means /transfers endpoint returns the correct endpoint when called right after block mined, but returns wrong result when called later after other transfer happened.
The /transfers endpoint lists the inscriptions that moved in each block, and the address that the inscription is currently at.
Sometimes an inscription moves twice in the same block. In that case (as in all cases) the /transfers endpoint will show the address that the inscription is currently at.
This is useful for sites that want to track the current location of inscriptions. They can use /transfers to get a list of the inscriptions that need updating in their db.
The /transfers endpoint returns a list of inscription IDs moved in a given block, very useful. But also returns addresses where inscription moved to. Also very useful. But that address wrong when inscription has moved again later, because
always look at current satpoint of inscription id. So I think is misleading to return address.
The text was updated successfully, but these errors were encountered: