Tabnine Logo
Contract.getRevisionId
Code IndexAdd Tabnine to your IDE (free)

How to use
getRevisionId
method
in
com.icodici.universa.contract.Contract

Best Java code snippets using com.icodici.universa.contract.Contract.getRevisionId (Showing top 2 results out of 315)

origin: UniversaBlockchain/universa

/**
 * All new items and self must have uniqie identication for its level, e.g. origin + revision + branch should always
 * ve different.
 */
private void checkDupesCreation() {
  if (newItems.isEmpty())
    return;
  Set<String> revisionIds = new HashSet<>();
  revisionIds.add(getRevisionId());
  int count = 0;
  for (Contract c : newItems) {
    String i = c.getRevisionId();
    if (revisionIds.contains(i)) {
      addError(Errors.BAD_VALUE, "new[" + count + "]", "duplicated revision id: " + i);
    } else
      revisionIds.add(i);
    count++;
  }
}
origin: UniversaBlockchain/universa

Contract c_2_2 = c_2_1.getNew().get(0);
System.out.println("c_2_1 revision id: " + c_2_1.getRevisionId());
assertTrue(c_2_1.check());
c_2_1.traceErrors();
Contract c_3_4 = c_3_3.getNew().get(0);
System.out.println("c_3_1 revision id: " + c_3_1.getRevisionId());
assertTrue(c_3_1.check());
c_3_1.traceErrors();
c_3_1.seal();
System.out.println("c_3_2 revision id: " + c_3_2.getRevisionId());
System.out.println("c_3_3 revision id: " + c_3_3.getRevisionId());
assertTrue(c_3_3.check());
c_3_3.traceErrors();
c_3_3.seal();
System.out.println("c_3_4 revision id: " + c_3_4.getRevisionId());
com.icodici.universa.contractContractgetRevisionId

Javadoc

Gets complex "id" of current revision

Popular methods of Contract

  • <init>
    Extract old, deprecated v2 self-contained binary partially unpacked by the TransactionPack, and fill
  • addNewItems
    Add one or more siblings to the contract. Note that those must be sealed before calling #seal() or #
  • addSignerKey
    Add private key to keys contract binary to be signed with when sealed next time. It is called before
  • getExpiresAt
    Get contract expiration time
  • getId
    Get the id sealing self if need
  • getPackedTransaction
    Pack the contract to the most modern .unicon format, same as TransactionPack#pack(). Uses bounded Tr
  • registerRole
    Register new role. Name must be unique otherwise existing role will be overwritten
  • seal
    Seal contract to binary. This call adds signatures from #getKeysToSignWith()
  • addSignatureToSeal
    Add signature to sealed (before) contract. Do not deserializing or changing contract bytes, but will
  • check
  • createRevision
    Create new revision to be changed, signed sealed and then ready to approve. Created "revision" contr
  • fromDslFile
    Create contract importing its parameters with passed .yaml file. No signatures are added automatical
  • createRevision,
  • fromDslFile,
  • fromPackedTransaction,
  • getCreatedAt,
  • getDefinition,
  • getErrors,
  • getKeysToSignWith,
  • getLastSealedBinary,
  • getNew,
  • getNewItems

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • String (java.lang)
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now