- this.route_handler = P2PGossipSync.of(this.router, Option_AccessZ.some(Access.new_impl(new Access.AccessInterface() {
- @Override
- public Result_TxOutAccessErrorZ get_utxo(byte[] genesis_hash, long short_channel_id) {
- // We don't exchange any gossip, so should never actually get called, but providing a Some(Access)
- // is a good test of our Option<Trait> free'ing, which used to be broken and relies on a dirty hack.
- assert false;
- return Result_TxOutAccessErrorZ.err(AccessError.LDKAccessError_UnknownTx);
- }
- })), this.logger);
+ this.route_handler = P2PGossipSync.of(this.router,
+ Option_AccessZ.some(Access.new_impl((genesis_hash, short_channel_id) -> Result_TxOutAccessErrorZ.ok(gossip_txout))), this.logger);