Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Destroy UTXO payload #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 [email protected]

}
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

@@ -192,7 +192,7 @@ func CheckTransactionBalance(Tx *tx.Transaction) error {
return errors.New("Invalide transaction UTXO output.")
}
}
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 <[email protected]>
@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