status.addPledges(pledge);
} else {
// Remove transactions so the contract can't be closed by anyone who requests the status.
// In future we may wish to optionally relax this constraint so anyone who can observe the project
// can prove to themselves the pledges really exist, and the contract can be closed by any user.
Sha256Hash origHash = LHUtils.hashFromPledge(pledge);
LHProtos.Pledge.Builder scrubbedPledge = pledge.toBuilder()
.clearTransactions()
.setOrigHash(ByteString.copyFrom(origHash.getBytes()));
status.addPledges(scrubbedPledge);
}
totalPledged += pledge.getTotalInputValue();
}