--- Day changed Mon Oct 01 2018 08:35 < stevenroose> andytoshi: 08:35 < stevenroose> > and i guess for completeness we'll add a PublicKey -> Address which requires a network, even though i don't like that 08:35 < stevenroose> I think that's better as an Address constructor, like they already exist. An address getter on pubkey is really confusing and not needed, you can go from pk to addr in like 5 different ways 08:36 < stevenroose> I think Address::p2pkh(network, pubkey) is the right way to do it 08:40 < stevenroose> My 2 cents on the pubkey with network thing: I don't think keys should have networks attached to them. A key is a key. I think the codes that collects/generates/stores the keys should be responsible for knowing what network they are to be used in. 08:43 < stevenroose> dongcarl: also have a question though: what's the best (programmatic) way to know from a TxOut if it needs to fill witness_utxo or non_witness_utxo? The Script struct doesn't seem to have any analysis getters like "is_sw" or whatever. Can also be hidden (p2sh sw) 08:43 < stevenroose> Is that for the spender to know? 08:44 < stevenroose> I guess filling both (witness_utxo and non_witness_utxo) is against the spec? 11:45 < stevenroose> also: dongcarl: https://github.com/rust-bitcoin/rust-bitcoin/issues/164#issuecomment-425636489 12:41 < dongcarl> stevenroose: I’m AFK for a few days, but will answer in a few days if you remind me <3 12:52 < andytoshi> stevenroose: agreed about having an Address constructor 12:58 -!- grubles_ [~grubles@unaffiliated/grubles] has joined #rust-bitcoin 12:58 -!- grubles [~grubles@unaffiliated/grubles] has quit [Read error: Connection reset by peer] 15:13 -!- grubles_ is now known as grubles 19:51 < stevenroose> Hmm 19:52 < stevenroose> I have a tx that I serialize through rust-bitcoin that when deserializing with rust-bitcoin, gives ParseFailed("Invalid length") 20:06 < stevenroose> Hmm, trying to reproduce in a simple file didn't give the error 20:07 < stevenroose> At least if I catched the right tx :D 20:30 < andytoshi> stevenroose: until https://github.com/rust-bitcoin/rust-bitcoin/pull/153 tranasctions won't round-trip in general 20:30 < andytoshi> but i don't think it should error 20:32 < andytoshi> hmm, actually even with #153 `04000000000000000000` will parse as a transaction, then not re-serialize .. i shuold check on that 20:35 < andytoshi> oh, heh, we have special code for empty transactions that is not replicated on serialization. hmmm. 20:36 < andytoshi> i wonder if #153 should remove that 20:40 < andytoshi> i think so. updated 20:46 < stevenroose> was one that bitcoind gave me 20:46 < stevenroose> looking into it, can't seem to find what's going on. I got it from bitcoind, deserialized it, inspected, serialized, stored; next run: deserialization fails :D 20:47 < stevenroose> anyway gtg