rgb-node
rgb-node copied to clipboard
Fix TransferCommand::Combine CLI command (NoOutpoint error)
reporting an issue mentioned in #196:
The TransferCommand::Combine CLI command seems to have a bug: let blank_bundle = TransitionBundle::blank(&outpoint_map, &bmap! {})?; will always receive a NoOutpoint error, since the TransitionBundle::blank method expects to find at least an outpoint in it:
let (op, close_method) = new_outpoints
.get(&input.ty)
.ok_or(Error::NoOutpoint(input.ty))?;
So we cannot provide an empty bmap for the new_outpoints parameter.
As said in this comment https://github.com/RGB-WG/rgb-node/pull/196#issuecomment-1242168140 we should allow the specification of new outpoints via CLI, eventually failing back to the change outpoint if those are not provided