Jeiwan / blockchain_go

A simplified blockchain implementation in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dual consumption BUG

yiuked opened this issue · comments

If a user has a balance of 2, and now he initiates a transaction with a payment of 2, and then a transaction with a payment of 2 when no block is generated, is there a dual consumption problem?

If a user has a balance of 2, and now he initiates a transaction with a payment of 2, and then a transaction with a payment of 2 when no block is generated, is there a dual consumption problem?

确实,part4中在寻找未花费输出的时候,直接从未花费交易里找,但该交易里有些输出可能已被花费了。。

If a user has a balance of 2, and now he initiates a transaction with a payment of 2, and then a transaction with a payment of 2 when no block is generated, is there a dual consumption problem?

确实,part4中在寻找未花费输出的时候,直接从未花费交易里找,但该交易里有些输出可能已被花费了。。

我在看博客时候看到了这个问题,所以来这里找答案,所以那里应该是寻找未花费vout而不是未花费交易吧