Skip to content

Commit

Permalink
Amend
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph committed Dec 11, 2024
1 parent 1d56f89 commit 2e0eaae
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6824,8 +6824,14 @@ next
});

[
InscriptionId { txid: txid_a, index: 0 },
InscriptionId { txid: txid_b, index: 0 },
InscriptionId {
txid: txid_a,
index: 0,
},
InscriptionId {
txid: txid_b,
index: 0,
},
]
};

Expand All @@ -6842,10 +6848,17 @@ next
..default()
});

let unmined_delegate = InscriptionId { txid: unmined_delegate_tx.compute_txid(), index: 0 };
let unmined_delegate = InscriptionId {
txid: unmined_delegate_tx.compute_txid(),
index: 0,
};

let inscription = Inscription {
delegates: vec![unmined_delegate.value(), mined_delegates[0].value(), mined_delegates[1].value()],
delegates: vec![
unmined_delegate.value(),
mined_delegates[0].value(),
mined_delegates[1].value(),
],
..default()
};

Expand All @@ -6858,7 +6871,8 @@ next

let id = InscriptionId { txid, index: 0 };

{ // test with first delegate not mined yet
{
// test with first delegate not mined yet
let delegate = mined_delegates[0];

server.assert_response_regex(
Expand All @@ -6875,7 +6889,7 @@ next
.*
</dl>.*"
)
.unindent(),
.unindent(),
);

server.assert_response(format!("/content/{id}"), StatusCode::OK, "foo");
Expand All @@ -6894,7 +6908,8 @@ next
server.core.broadcast_tx(unmined_delegate_tx);
server.mine_blocks(1);

{ // test with first delegate not mined yet
{
// test with first delegate not mined yet
let delegate = unmined_delegate;

server.assert_response_regex(
Expand All @@ -6911,7 +6926,7 @@ next
.*
</dl>.*"
)
.unindent(),
.unindent(),
);

server.assert_response(format!("/content/{id}"), StatusCode::OK, "foo");
Expand All @@ -6928,7 +6943,6 @@ next
}
}


#[test]
fn undelegated_content() {
let server = TestServer::builder().chain(Chain::Regtest).build();
Expand Down

0 comments on commit 2e0eaae

Please sign in to comment.