Skip to content

Conversation

@Arbio5zt
Copy link
Member

The UTXO owner can Destory self controled UTXOs
and will reduce the value of asset total issued quantity.

Signed-off-by: luodanwg luodan.wg@gmail.com

}
for assetId, value := range results {
if _, ok := quantities[assetId]; !ok {
quantities[assetId] += value * -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usage expression quantities[assetId] -= value

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@Arbio5zt Arbio5zt force-pushed the DestroyUTXO branch 2 times, most recently from 1624443 to 61a7af6 Compare July 27, 2017 07:07
@gasby88
Copy link
Contributor

gasby88 commented Jul 27, 2017

approve

@Arbio5zt Arbio5zt closed this Jul 27, 2017
@Arbio5zt Arbio5zt reopened this Jul 27, 2017
Copy link
Contributor

@sharpbear sharpbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Destory UTXO tx, needn't check TX balance.

@Arbio5zt
Copy link
Member Author

thanks for review. added balance check exception when DestroyUTXO payload. but the outputs should be 0. could you helps to check it again,thanks.

Copy link
Contributor

@sharpbear sharpbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

}
}
if Tx.TxType == tx.IssueAsset {
if Tx.TxType == tx.IssueAsset || Tx.TxType == tx.DestroyUTXO {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Destory UTXO should check the output, not input

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@Arbio5zt Arbio5zt force-pushed the DestroyUTXO branch 4 times, most recently from 1f1253f to a24e651 Compare July 31, 2017 03:38
add Destroy UTXO payload

Signed-off-by: luodanwg <luodan.wg@gmail.com>
@Arbio5zt
Copy link
Member Author

Arbio5zt commented Aug 3, 2017

add validation check of should be destroyed by asset issuer.

Honglei-Cong pushed a commit to Honglei-Cong/DNA that referenced this pull request Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants