PeerAssets / pypeerassets

Reference implementation of the PeerAssets protocol.
BSD 3-Clause "New" or "Revised" License
12 stars 16 forks source link

make_raw_transaction (Transaction vs. PeercoinTx) #122

Closed saeveritt closed 6 years ago

saeveritt commented 6 years ago

We need to pass network parameters to make_raw_transaction in transactions.py or choose between Transaction and PeercoinTx appropriately.

Inside peerassets-btcpty transaction structs there are two classes, Transaction and PeercoinTx. https://github.com/PeerAssets/pypeerassets/blob/master/pypeerassets/transactions.py#L66

peerchemist commented 6 years ago

This is relevant to new, unmerged branch @ belovachap:chapman_check_btcpy_integration

saeveritt commented 6 years ago

I believe it's relevant to both. Right now the master branch uses the Transaction class by default for make_raw_transaction.

belovachap commented 6 years ago

@saeveritt good catch, using the "experimental btcpy" (a.k.a. PeerAssets/btcpy@master) make_raw_transaction is hard coded to just use Bitcoin Transactions at the moment. I'll write a test and make a patch in https://github.com/PeerAssets/pypeerassets/pull/121 to either pass network params or otherwise let callers signal the Transaction Class they're working with :)

peerchemist commented 6 years ago

Network name parameter should be passed indeed.