[][src]Function grin_chain::txhashset::input_pos_to_rewind

pub fn input_pos_to_rewind(
    block_header: &BlockHeader,
    head_header: &BlockHeader,
    batch: &Batch
) -> Result<Bitmap, Error>

Given a block header to rewind to and the block header at the head of the current chain state, we need to calculate the positions of all inputs (spent outputs) we need to "undo" during a rewind. We do this by leveraging the "block_input_bitmap" cache and OR'ing the set of bitmaps together for the set of blocks being rewound.