From 2768f369bbcbcd51937e63be1d5506306ba3ee69 Mon Sep 17 00:00:00 2001 From: mattbradburyr3 Date: Tue, 7 Feb 2023 17:52:34 +0000 Subject: [PATCH] tidy up comments --- .../utxoexample/contracts/ChatContract.java | 6 ---- .../utxoexample/states/ChatState.java | 34 +------------------ 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/contracts/ChatContract.java b/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/contracts/ChatContract.java index 15f6b54..1d40c3e 100644 --- a/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/contracts/ChatContract.java +++ b/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/contracts/ChatContract.java @@ -26,15 +26,9 @@ public class ChatContract implements Contract { public static class Create implements Command { } public static class Update implements Command { } -// @Override -// public boolean isRelevant(@NotNull ContractState state, @NotNull Set myKeys) { -// return Contract.super.isRelevant(state, myKeys); -// } - @Override public void verify(UtxoLedgerTransaction transaction) { -// Command command = requireNonNull( transaction.getCommands().get(0), "Require a single command"); // this doesn't ensure there is one command requireThat( transaction.getCommands().size() == 1, "Require a single command."); Command command = transaction.getCommands().get(0); diff --git a/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/states/ChatState.java b/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/states/ChatState.java index 20f80ef..3ecea91 100644 --- a/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/states/ChatState.java +++ b/contracts/src/main/java/com/r3/developers/csdetemplate/utxoexample/states/ChatState.java @@ -11,9 +11,6 @@ import org.jetbrains.annotations.NotNull; import java.security.PublicKey; import java.util.*; -// todo: Clear out commented code - -//@CordaSerializable @BelongsToContract(ChatContract.class) public class ChatState implements ContractState { @@ -23,9 +20,6 @@ public class ChatState implements ContractState { private String message; public List participants; -// public ChatState() { // todo why do we need this? -// } - // Allows serialisation and to use a specified UUID. @ConstructorForDeserialization public ChatState(UUID id, @@ -40,18 +34,6 @@ public class ChatState implements ContractState { this.participants = participants; } -// // Convenience constructor for initial ChatState objects that need a new UUID generated. -// public ChatState(String chatName, -// MemberX500Name messageFrom, -// String message, -// List participants) { -// this(UUID.randomUUID(), -// chatName, -// messageFrom, -// message, -// participants); -// } - public UUID getId() { return id; } @@ -64,26 +46,12 @@ public class ChatState implements ContractState { public String getMessage() { return message; } -// @NotNull -// @Override + public List getParticipants() { return participants; } - public ChatState updateMessage(MemberX500Name name, String message) { return new ChatState(id, chatName, name, message, participants); } -// -// // todo: why is this overridden -// @Override -// public String toString() { -// return ChatState.class.getName() + -// "(id=" + id + -// ", chatName=" + chatName + -// ", messageFrom=" + messageFrom + -// ", message=" + message + -// ", participants=" + participants + -// ")"; -// } } \ No newline at end of file