Skip to content

Fix panic in create_tx #237

Open
Open
@ValuedMammal

Description

@ValuedMammal

This looks like an unnecessarily eager use of .expect that will eventually cause a panic if reveal_to_target happens to return None.

// recording changes to the change keychain
if let (Excess::Change { .. }, Some((keychain, index))) = (excess, drain_index) {
let (_, index_changeset) = self
.indexed_graph
.index
.reveal_to_target(keychain, index)
.expect("must not be None");
self.stage.merge(index_changeset.into());
self.mark_used(keychain, index);
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions