chromaway / ngcccbase

next-gen colored coin client base
MIT License
85 stars 46 forks source link

Issue #125: ColorValue object #128

Closed jimmysong closed 10 years ago

jimmysong commented 10 years ago

Issue #125: ColorValue object Issue #29: Unit Tests Issue #105: System and Integration Testing

ColorValue is now an object that holds data about a colorvalue. It includes:

There are multiple subclasses, of which SimpleColorValue is the one used everywhere.

AssetValue is now an object that holds data about an assetvalue. It includes:

There is one main subclass, AdditiveAssetValue which is used everywhere.

ColorTarget and AssetTarget correspond to targets of various TxSpecs.

jimmysong commented 10 years ago

This is a ridiculously long checkin, in large part because I've done a good chunk of issue #29 and issue #105 as well. I'm not sure I got the assetvalue to colorvalue transition correct and I'm not sure whether unit was supposed to stay in AssetDefinition or put up further into ColorDefinition, but here's my effort after 35 hours or so. I'm afraid waiting any longer would have way too many merge conflicts to be able to manage effectively.

amidvidy commented 10 years ago

would it be possible to break this up into a few more granular commits?

jimmysong commented 10 years ago

It'll take me a few hours at least. It's up to killerstorm to decide if it's worth the time.

arichnad commented 10 years ago

Any update on this pull request? Thanks.

killerstorm commented 10 years ago

Jimmy will update p2ptrade too. Size of this pull request is not a problem, as I'm not going to discuss each individual part of it anyway.

We'll merge it after p2ptrade works, then further refactoring, if necessary, will go as separate tasks.

killerstorm commented 10 years ago

Just to clarify, there is a lot of refactoring ahead, so I'm not too concerned about quality of commits. After we'll finish with major refactoring I'll pay more attention to code reviews.

jimmysong commented 10 years ago

p2p should work now. I've added p2p unit tests (it includes testing the threaded stuff!).

We should have pretty close to 100% statement coverage for ngcccbase and coloredcoinlib. ui is not something I've touched yet.

killerstorm commented 10 years ago

I think we'll rewrite the parts responsible for ui <-> wallet interaction, so unit testing it is kinda pointless.