Commit 749d4315 authored by Michel Schudel's avatar Michel Schudel

force order of rendering, to avoid field implementation order differences from...

force order of rendering, to avoid field implementation order differences from multiple students to cause hash fails.
parent 423a3160
package nl.craftsmen.blockchain.craftscoinnode.blockchain;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import nl.craftsmen.blockchain.craftscoinnode.transaction.Transaction;
import java.util.HashSet;
import java.util.Set;
@JsonPropertyOrder(alphabetic = true)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
public class Block {
......
......@@ -2,6 +2,7 @@ package nl.craftsmen.blockchain.craftscoinnode.blockchain;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import nl.craftsmen.blockchain.craftscoinnode.transaction.Transaction;
import java.time.Instant;
......@@ -11,6 +12,7 @@ import java.util.stream.Collectors;
/**
* Implementation of the blockchain.
*/
@JsonPropertyOrder(alphabetic = true)
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
public class Blockchain {
......
package nl.craftsmen.blockchain.craftscoinnode.transaction;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.math.BigDecimal;
import java.util.UUID;
@JsonPropertyOrder(alphabetic = true)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
public class Transaction {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment