@ -3,7 +3,7 @@
* Expect route 03 c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf - > 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae - > 02 ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06
*
* getchannels :
* { ' channels ' : [ { ' active ' : True , ' short_id ' : ' 6990 : 2 : 1 / 1 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' flags ' : 1 , ' destination ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' source ' : ' 02 ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06 ' , ' last_update ' : 1504064344 } , { ' active ' : True , ' short_id ' : ' 6989 : 2 : 1 / 0 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' flags ' : 0 , ' destination ' : ' 03 c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf ' , ' source ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' last_update ' : 1504064344 } , { ' active ' : True , ' short_id ' : ' 6990 : 2 : 1 / 0 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' flags ' : 0 , ' destination ' : ' 02 ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06 ' , ' source ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' last_update ' : 1504064344 } , { ' active ' : True , ' short_id ' : ' 6989 : 2 : 1 / 1 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' flags ' : 1 , ' destination ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' source ' : ' 03 c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf ' , ' last_update ' : 1504064344 } ] }
* { ' channels ' : [ { ' active ' : True , ' short_id ' : ' 6990 : 2 : 1 / 1 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' message_flags ' : 0 , ' channel_ flags' : 1 , ' destination ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' source ' : ' 02 ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06 ' , ' last_update ' : 1504064344 } , { ' active ' : True , ' short_id ' : ' 6989 : 2 : 1 / 0 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' message_flags ' : 0 , ' channel_ flags' : 0 , ' destination ' : ' 03 c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf ' , ' source ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' last_update ' : 1504064344 } , { ' active ' : True , ' short_id ' : ' 6990 : 2 : 1 / 0 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' message_flags ' : 0 , ' channel_ flags' : 0 , ' destination ' : ' 02 ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06 ' , ' source ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' last_update ' : 1504064344 } , { ' active ' : True , ' short_id ' : ' 6989 : 2 : 1 / 1 ' , ' fee_per_kw ' : 10 , ' delay ' : 5 , ' message_flags ' : 0 , ' channel_ flags' : 1 , ' destination ' : ' 0230 ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae ' , ' source ' : ' 03 c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf ' , ' last_update ' : 1504064344 } ] }
*/
# include <common/status.h>
@ -27,7 +27,7 @@ void broadcast_del(struct broadcast_state *bstate UNNEEDED, u64 index UNNEEDED,
bool fromwire_channel_announcement ( const tal_t * ctx UNNEEDED , const void * p UNNEEDED , secp256k1_ecdsa_signature * node_signature_1 UNNEEDED , secp256k1_ecdsa_signature * node_signature_2 UNNEEDED , secp256k1_ecdsa_signature * bitcoin_signature_1 UNNEEDED , secp256k1_ecdsa_signature * bitcoin_signature_2 UNNEEDED , u8 * * features UNNEEDED , struct bitcoin_blkid * chain_hash UNNEEDED , struct short_channel_id * short_channel_id UNNEEDED , struct pubkey * node_id_1 UNNEEDED , struct pubkey * node_id_2 UNNEEDED , struct pubkey * bitcoin_key_1 UNNEEDED , struct pubkey * bitcoin_key_2 UNNEEDED )
{ fprintf ( stderr , " fromwire_channel_announcement called! \n " ) ; abort ( ) ; }
/* Generated stub for fromwire_channel_update */
bool fromwire_channel_update ( const void * p UNNEEDED , secp256k1_ecdsa_signature * signature UNNEEDED , struct bitcoin_blkid * chain_hash UNNEEDED , struct short_channel_id * short_channel_id UNNEEDED , u32 * timestamp UNNEEDED , u16 * flags UNNEEDED , u16 * cltv_expiry_delta UNNEEDED , u64 * htlc_minimum_msat UNNEEDED , u32 * fee_base_msat UNNEEDED , u32 * fee_proportional_millionths UNNEEDED )
bool fromwire_channel_update ( const void * p UNNEEDED , secp256k1_ecdsa_signature * signature UNNEEDED , struct bitcoin_blkid * chain_hash UNNEEDED , struct short_channel_id * short_channel_id UNNEEDED , u32 * timestamp UNNEEDED , u8 * message_flags UNNEEDED , u8 * channel_ flags UNNEEDED , u16 * cltv_expiry_delta UNNEEDED , u64 * htlc_minimum_msat UNNEEDED , u32 * fee_base_msat UNNEEDED , u32 * fee_proportional_millionths UNNEEDED )
{ fprintf ( stderr , " fromwire_channel_update called! \n " ) ; abort ( ) ; }
/* Generated stub for fromwire_gossip_local_add_channel */
bool fromwire_gossip_local_add_channel ( const void * p UNNEEDED , struct short_channel_id * short_channel_id UNNEEDED , struct pubkey * remote_node_id UNNEEDED , u64 * satoshis UNNEEDED )
@ -172,38 +172,42 @@ int main(void)
rstate = new_routing_state ( tmpctx , & zerohash , & a , 0 ) ;
/* [{'active': True, 'short_id': '6990:2:1/1', 'fee_per_kw': 10, 'delay': 5, 'flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'last_update': 1504064344}, */
/* [{'active': True, 'short_id': '6990:2:1/1', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_ flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'last_update': 1504064344}, */
nc = get_or_make_connection ( rstate , & c , & b , " 6990:2:1 " , 1000 ) ;
nc - > base_fee = 0 ;
nc - > proportional_fee = 10 ;
nc - > delay = 5 ;
nc - > flags = 1 ;
nc - > channel_flags = 1 ;
nc - > message_flags = 0 ;
nc - > last_timestamp = 1504064344 ;
/* {'active': True, 'short_id': '6989:2:1/0', 'fee_per_kw': 10, 'delay': 5, 'flags': 0, 'destination': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, */
/* {'active': True, 'short_id': '6989:2:1/0', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_ flags': 0, 'destination': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, */
nc = get_or_make_connection ( rstate , & b , & a , " 6989:2:1 " , 1000 ) ;
nc - > base_fee = 0 ;
nc - > proportional_fee = 10 ;
nc - > delay = 5 ;
nc - > flags = 0 ;
nc - > channel_flags = 0 ;
nc - > message_flags = 0 ;
nc - > last_timestamp = 1504064344 ;
/* {'active': True, 'short_id': '6990:2:1/0', 'fee_per_kw': 10, 'delay': 5, 'flags': 0, 'destination': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, */
/* {'active': True, 'short_id': '6990:2:1/0', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_ flags': 0, 'destination': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, */
nc = get_or_make_connection ( rstate , & b , & c , " 6990:2:1 " , 1000 ) ;
nc - > base_fee = 0 ;
nc - > proportional_fee = 10 ;
nc - > delay = 5 ;
nc - > flags = 0 ;
nc - > channel_flags = 0 ;
nc - > message_flags = 0 ;
nc - > last_timestamp = 1504064344 ;
nc - > htlc_minimum_msat = 100 ;
/* {'active': True, 'short_id': '6989:2:1/1', 'fee_per_kw': 10, 'delay': 5, 'flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'last_update': 1504064344}]} */
/* {'active': True, 'short_id': '6989:2:1/1', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_ flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'last_update': 1504064344}]} */
nc = get_or_make_connection ( rstate , & a , & b , " 6989:2:1 " , 1000 ) ;
nc - > base_fee = 0 ;
nc - > proportional_fee = 10 ;
nc - > delay = 5 ;
nc - > flags = 1 ;
nc - > channel_flags = 1 ;
nc - > message_flags = 0 ;
nc - > last_timestamp = 1504064344 ;
route = find_route ( tmpctx , rstate , & a , & c , 100000 , riskfactor , 0.0 , NULL , & fee ) ;