[bindings] Use consistent imports for MessageSendEvents traits
authorMatt Corallo <git@bluematt.me>
Fri, 1 Jan 2021 01:19:21 +0000 (20:19 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 1 Feb 2021 21:52:57 +0000 (16:52 -0500)
commit70440a529eb31370fdad626932b882d20fa50b7a
treec6f359bb727b6e3bebc9f8a05d472f5f4c062256
parentecf736a9a500905bb38e860a4a49283534428c0c
[bindings] Use consistent imports for MessageSendEvents traits

Our bindings generator is braindead with respect to the idents
used in a trait definition - it treats them as if they were used
where the trait is being used, instead of where the trait is
defined. Thus, if the idents used in a trait definition are not
also imported the same in the files where the traits are used, we
will claim the idents are bogus.

I spent some time trying to track the TypeResolvers globally
through the entire conversion run so that we could use the original
file's TypeResolver later when using the trait, but it is somewhat
of a lifetime mess. While likely possible, import consistency is
generally the case anyway, so unless it becomes more of an issue in
the future, it likely makes the most sense to just keep imports
consistent.

This commit keeps imports consistent across trait definition files
around `MessageSendEvent` and `MessageSendEventsProvider`.
lightning/src/ln/msgs.rs
lightning/src/routing/network_graph.rs