Closed yuzhangiot closed 10 years ago
FYI: I really can't find class UTXO, so I don't understand this script utxo = UTXO(txhash, outindex, prevout.value, prevout.script) in file p2ptrade/ewctrl.py. Does it hasn't implemented yet? Thanks.
This was a result of refactoring: UTXO was renamed to Coin. I'll push a patch in a couple of hours.
I've pushed a patch. Here's p2ptrade transaction made with the current version of code:
https://helloblock.io/transactions/2f1a9e117857859fe9497edb5d5e2fd247ed8d8c598b397b68c1c0a50f22297c
(note that helloblock.io is recommended, as blockchain.info seems to think that transactions with non-zero nSequence are non-standard.)
from ngcccbase.services.helloblock import HelloBlockInterface ImportError: No module named helloblock
There is no helloblock.py under the catalog ngcccbase/services?
P2P problem has been solved, thanks!
Ouch, I forgot to add helloblock.py
I made two orders about buy and sell, and the amount and price of them are exactly same. But it does not work well. Error codes are listed as follows:
ep oid:187f09bf58738ad2, pid:4f5d3935dbb425eb, ag:<ngcccbase.p2ptrade.agent.EAgent object at 0x19e7450> accept exchange proposal got exception global name 'UTXO' is not defined when dispatching a message Traceback (most recent call last): File "/home/zhangyu/colorcoin/ngcccbase02/ui/tradepage.py", line 129, in update_agent wallet.p2p_agent.update() File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/agent.py", line 186, in update self.comm.poll_and_dispatch() File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/comm.py", line 75, in poll_and_dispatch a.dispatch_message(content) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/agent.py", line 179, in dispatch_message self.dispatch_exchange_proposal(content) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/agent.py", line 127, in dispatch_exchange_proposal return self.accept_exchange_proposal(ep) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/agent.py", line 140, in accept_exchange_proposal reply_ep = ep.accept(my_offer) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/protocol_objects.py", line 141, in accept return MyReplyEProposal(self.ewctrl, self, my_offer) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/protocol_objects.py", line 114, in init my_offer.B) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/ewctrl.py", line 211, in make_reply_tx op_tx_spec.prepare_inputs(etx_spec) File "/home/zhangyu/colorcoin/ngcccbase02/ngcccbase/p2ptrade/ewctrl.py", line 38, in prepare_inputs utxo = UTXO(txhash, outindex, prevout.value, prevout.script) NameError: global name 'UTXO' is not defined
It seems that we missed a class?