Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Change method sign to BytesValue
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistevam committed Mar 4, 2019
1 parent cddaa78 commit 56e86b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,23 +132,21 @@ public static Address contractAddress(final Address senderAddress, final long no
/**
* Address of the created private contract.
*
* <p>This implement equation (86) in Section 7 of the Yellow Paper (rev. a91c29c).
*
* @param senderAddress the address of the transaction sender.
* @param nonce the nonce of this transaction.
* @param privacyGroup hash of participants list ordered from Enclave response.
* @param privacyGroupId hash of participants list ordered from Enclave response.
* @return The generated address of the created private contract.
*/
public static Address privateContractAddress(
final Address senderAddress, final long nonce, final int privacyGroup) {
final Address senderAddress, final long nonce, final BytesValue privacyGroupId) {
return Address.extract(
Hash.hash(
RLP.encode(
out -> {
out.startList();
out.writeBytesValue(senderAddress);
out.writeLongScalar(nonce);
out.writeIntScalar(privacyGroup);
out.writeBytesValue(privacyGroupId);
out.endList();
})));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public Result processTransaction(
final Deque<MessageFrame> messageFrameStack = new ArrayDeque<>();
if (transaction.isContractCreation()) {
final Address privateContractAddress =
Address.privateContractAddress(senderAddress, sender.getNonce() - 1L, 0);
Address.privateContractAddress(senderAddress, sender.getNonce() - 1L, BytesValue.EMPTY);

initialFrame =
MessageFrame.builder()
Expand Down

0 comments on commit 56e86b5

Please sign in to comment.