MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_commitment_revocation_hook

Function test_commitment_revocation_hook

cln-rpc/src/test.rs:351–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

349
350#[test]
351fn test_commitment_revocation_hook() {
352 let r = serde_json::json!({
353 "commitment_txid": "58eea2cf538cfed79f4d6b809b920b40bb6b35962c4bb4cc81f5550a7728ab05",
354 "penalty_tx": "02000000000101...ac00000000",
355 "channel_id": "fb16398de93e8690c665873715ef590c038dfac5dd6c49a9d4b61dccfcedc2fb",
356 "commitnum": 21
357 });
358 let d: CommitmentRevocationEvent = serde_json::from_value(r).unwrap();
359 assert_eq!(
360 d.commitment_txid,
361 "58eea2cf538cfed79f4d6b809b920b40bb6b35962c4bb4cc81f5550a7728ab05"
362 );
363 assert_eq!(d.penalty_tx, "02000000000101...ac00000000");
364 assert_eq!(
365 d.channel_id.to_string(),
366 "fb16398de93e8690c665873715ef590c038dfac5dd6c49a9d4b61dccfcedc2fb"
367 );
368 assert_eq!(d.commitnum, 21);
369 assert_serde_roundtrip!(d, CommitmentRevocationEvent);
370}
371
372#[test]
373fn test_db_write_hook() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected