mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
MakerTxSanityCheckTests: Add checkFeeAmountMissingVoutValue test
This commit is contained in:
parent
49725689ca
commit
873757e865
@ -191,6 +191,24 @@ public class MakerTxValidatorSanityCheckTests {
|
||||
assertThat(txValidator1.getStatus(), is(FeeValidationStatus.NACK_JSON_ERROR));
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkFeeAmountMissingVoutValue() {
|
||||
JsonObject json = MakerTxValidatorSanityCheckTests.getValidBtcMakerFeeMempoolJsonResponse();
|
||||
JsonObject firstOutput = json.getAsJsonArray("vout").get(0).getAsJsonObject();
|
||||
firstOutput.remove("value");
|
||||
|
||||
boolean hasPreVout = json.getAsJsonArray("vout")
|
||||
.get(0).getAsJsonObject()
|
||||
.has("value");
|
||||
assertThat(hasPreVout, is(false));
|
||||
|
||||
String jsonContent = new Gson().toJson(json);
|
||||
TxValidator txValidator1 = txValidator.parseJsonValidateMakerFeeTx(jsonContent,
|
||||
MakerTxValidatorSanityCheckTests.FEE_RECEIVER_ADDRESSES);
|
||||
|
||||
assertThat(txValidator1.getStatus(), is(FeeValidationStatus.NACK_JSON_ERROR));
|
||||
}
|
||||
|
||||
@Test
|
||||
void responseHasDifferentTxId() {
|
||||
String differentTxId = "abcde971ead7d03619e3a9eeaa771ed5adba14c448839e0299f857f7bb4ec07";
|
||||
|
Loading…
Reference in New Issue
Block a user